/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #fff;
    color: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Сайдбар */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background-color: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-content {
    transform: rotate(-90deg);
    white-space: nowrap;
    text-align: center;
}

.sidebar-content .logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
}

.sidebar-number {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.7;
}

/* Шапка */
header {
    background-color: #000;
    color: #fff;
    padding: 20px 0;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content .logo {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.header-content .logo:hover {
    opacity: 0.8;
}

.header-icons {
    display: flex;
    gap: 20px;
}

.icon-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    padding: 5px;
    transition: opacity 0.3s;
}

.icon-btn:hover {
    opacity: 0.8;
}

.icon-img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* Основной контент */
main {
    flex: 1;
    padding: 60px 20px;
    margin-left: 80px;
}

/* Каталог */
.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-card {
    background: #fff;
    text-align: center;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card a {
    display: block;
    position: relative;
    overflow: hidden;
    padding-bottom: 100%; /* Соотношение сторон 1:1 */
}

.product-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    background: #fff;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
}

.add-to-cart {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background: #333;
}

.add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Страница товара */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-gallery {
    position: relative;
}

.main-image {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 100%; /* Соотношение сторон 1:1 */
    overflow: hidden;
}

.main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
}

.product-details {
    padding: 20px;
}

.product-details .product-title {
    font-size: 24px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-details .product-price {
    font-size: 20px;
    margin-bottom: 30px;
    font-weight: bold;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 14px;
    color: #666;
}

.size-selector {
    margin-bottom: 30px;
}

.size-selector h3 {
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.size-options {
    display: flex;
    gap: 10px;
}

.size-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.size-btn:hover {
    border-color: #000;
}

.size-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Формы авторизации */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.auth-container h2 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group select{
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    font-size: 16px;
    background: #f5f5f5;
    border-radius: 4px;
}

.auth-button {
    background: #000;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.auth-button:hover {
    background: #333;
}

.auth-link {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
}

.auth-link a {
    color: #000;
    text-decoration: underline;
}

/* Корзина */
.cart-container {
    max-width: 800px;
    margin: 0 auto;
}

.cart-container h2 {
    font-size: 24px;
    margin-bottom: 40px;
}

.cart-items {
    margin: 30px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cart-item img {
    width: 100px;
    margin-right: 30px;
    border-radius: 4px;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-info h3 {
    font-size: 18px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-item-info p {
    color: #666;
    font-size: 14px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.quantity-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #e0e0e0;
}

.quantity {
    font-size: 16px;
    min-width: 24px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.remove-item:hover {
    color: #ff4444;
}

.cart-summary {
    margin-top: 40px;
    text-align: right;
}

.total {
    font-size: 24px;
    margin-bottom: 30px;
}

.checkout-button {
    background: #000;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.checkout-button:hover {
    background: #333;
}

/* Заказы */
.orders-container {
    max-width: 800px;
    margin: 0 auto;
}

.orders-container h2 {
    font-size: 24px;
    margin-bottom: 40px;
}

.order-item {
    border: 1px solid #eee;
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 16px;
}

.order-products {
    margin: 30px 0;
}

.order-product {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.order-product img {
    width: 100px;
    margin-right: 30px;
    border-radius: 4px;
}

.order-total {
    text-align: right;
    font-size: 20px;
    font-weight: bold;
}

/* Футер */
footer {
    background: none;
    padding: 30px;
    margin-left: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
}

footer a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
    text-transform: lowercase;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 0.7;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    main, footer {
        margin-left: 60px;
    }

    .header-content .logo {
        font-size: 48px;
    }

    .catalog {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .product-page {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .header-content .logo {
        font-size: 36px;
    }

    .catalog {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    position: relative;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-content .size-options {
    justify-content: center;
    margin-bottom: 20px;
}

.confirm-size-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.confirm-size-btn:hover {
    background: #333;
}

.authText{
    text-align: center;
    color: red;
    margin-top: 8px;
    line-height: 1;
}
