/* Стили для публичной страницы магазина (shop.php) */
:root {
    --shop-bg: #f4f7fa;
    --shop-card-bg: #fff;
    --shop-text-dark: #1a1a1a;
    --shop-text-muted: #8b929c;
    --shop-price-red: #ea1e63;
    --shop-btn-blue: var(--4win-primary, #FA6400);
    --shop-accent-pink: #ff0055;
}

body {
    background-color: var(--shop-bg);
}

/* --- Шапка профиля магазина --- */
.shop-profile-header {
    background: var(--shop-card-bg);
    border-radius: 24px;
    padding: 20px 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.shop-profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.shop-profile-avatar {
    width: 64px;
    height: 64px;
    background: #E8EDF3;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #333;
}

.shop-profile-details h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--shop-text-dark);
}

.shop-profile-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--shop-text-dark);
    font-weight: 600;
}

.shop-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f4f7fa;
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--shop-text-muted);
}
.shop-meta-badge.role-badge {
    background: #f4f7fa;
    color: #333;
}
.shop-meta-badge.rating {
    color: #ff9800;
}
.shop-meta-badge.rating span {
    color: var(--shop-text-dark);
}

.shop-profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-shop-action-main {
    background: #f4f7fa;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-shop-action-main:hover {
    background: #e6eaf0;
}
.btn-shop-icon {
    width: 40px;
    height: 40px;
    background: #f4f7fa;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #717b8b;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.btn-shop-icon:hover {
    background: #e6eaf0;
    color: #333;
}

/* --- Сетка товаров --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

/* --- Карточка товара --- */
.product-card {
    background: var(--shop-card-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    padding: 15px;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    transform: none !important;
    box-shadow: none !important;
}

.product-card:hover,
.product-card:focus {
    transform: none !important;
    box-shadow: none !important;
}

.product-image-container {
    width: 100%;
    aspect-ratio: 3/4;
    background: #f0f0f0;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge-wow {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #000;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}
.product-badge-wow svg {
    color: var(--shop-accent-pink);
    fill: var(--shop-accent-pink);
}

.product-like-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 2;
    color: #333;
    transition: transform 0.1s;
}
.product-like-btn svg {
    fill: none;
    transition: fill 0.2s, color 0.2s;
}
.product-like-btn.active svg {
    fill: var(--shop-accent-pink);
    color: var(--shop-accent-pink);
}
.product-like-btn:hover {
    transform: scale(1.1);
}

/* Тело карточки */
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.product-price-current {
    font-size: 24px;
    font-weight: 800;
    color: var(--shop-price-red);
    letter-spacing: -1px;
}
.product-price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: 600;
}
.product-discount {
    font-size: 13px;
    font-weight: 800;
    color: var(--shop-price-red);
}

.product-quantity {
    font-size: 13px;
    font-weight: 600;
    color: var(--shop-accent-pink);
    margin-bottom: 6px;
}

.product-title {
    font-size: 15px;
    line-height: 1.3;
    color: var(--shop-text-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-card.adult-card-locked .product-image,
.product-card.adult-card-locked .adult-title-blur {
    filter: blur(12px);
}

.adult-content-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(14, 18, 26, 0.48);
    z-index: 4;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-card.adult-card-locked .adult-content-overlay {
    display: flex;
}

.adult-content-overlay-label {
    background: #ea1e63;
    color: #fff;
    border: 1px solid #ea1e63;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.adult-modal-card .modal-right {
    padding: 30px 28px;
}

.adult-modal-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
}

.adult-modal-text {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.45;
}

.adult-modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.adult-modal-secondary {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #d7dde8;
    background: #f3f5f8;
    color: #111827;
}

.adult-modal-primary {
    margin-top: 0;
    width: auto;
    padding: 12px 18px;
    font-size: 14px;
}

.shop-adult-notice {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    border-radius: 14px;
    padding: 18px;
    margin: 8px 0 24px;
}

.shop-adult-notice h4 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
}

.shop-adult-notice p {
    margin: 0;
    color: #78350f;
}

.shop-adult-notice-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.shop-adult-notice-actions .adult-warning-btn {
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
}

.shop-adult-notice-actions .adult-warning-btn.primary {
    background: var(--4win-primary);
    color: #fff;
}

.shop-adult-notice-actions .adult-warning-btn.secondary {
    background: #f3f5f8;
    color: #111827;
}

/* --- Лоадер --- */
.shop-spinner-win {
    width: 44px;
    height: 44px;
    animation: shop-rotate 2s linear infinite;
    display: inline-block;
}
.shop-spinner-win .path {
    stroke: var(--shop-btn-blue);
    stroke-linecap: round;
    animation: shop-dash 1.5s ease-in-out infinite;
}
@keyframes shop-rotate { 100% { transform: rotate(360deg); } }
@keyframes shop-dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.product-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}
.product-rating svg {
    color: #ff9800;
    fill: #ff9800;
}
.product-reviews {
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Корзина - счетчик */
.cart-control-wrapper {
    height: 48px;
    width: 100%;
}

.product-cart-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eaf3fe;
    border-radius: 14px;
    padding: 0 12px;
    width: 100%;
    height: 100%;
}

.btn-cart-minus, .btn-cart-plus {
    background: none;
    border: none;
    color: var(--shop-btn-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    height: 100%;
    width: 32px;
    transition: opacity 0.2s;
}

.btn-cart-minus:hover, .btn-cart-plus:hover {
    opacity: 0.7;
}

.cart-count-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--shop-text-dark);
}

.btn-product-buy {
    background: var(--shop-btn-blue);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 12px;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: filter 0.2s, background-color 0.2s;
    background-color: var(--shop-btn-blue) !important;
}
.btn-product-buy:hover {
    filter: brightness(0.9);
    background-color: var(--shop-btn-blue) !important;
    transform: none !important;
}

@media (max-width: 768px) {
    .shop-profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
    }
    .shop-profile-actions {
        width: 100%;
        justify-content: space-between;
    }
    .btn-shop-action-main {
        flex: 1;
        justify-content: center;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    .product-price-current {
        font-size: 20px;
    }
    .product-image-container {
        border-radius: 10px;
    }
}
