/* =====================================================
   SHOP PAGE STYLES
   ===================================================== */

.shop-section {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--cream);
}

/* Product highlight animation when navigating from anchor */
.shop-card.highlight {
    animation: highlightPulse 2s ease-out;
    box-shadow: 0 0 0 4px var(--accent), var(--shadow-lg);
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 4px var(--accent), 0 0 30px rgba(201, 162, 39, 0.5);
        transform: scale(1.02);
    }
    100% {
        box-shadow: var(--shadow);
        transform: scale(1);
    }
}

.shop-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    position: relative;
}

.shop-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
    font-weight: 600;
}

.shop-title::before,
.shop-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
}

.shop-title::before {
    right: calc(100% + 15px);
    background: linear-gradient(90deg, transparent, var(--accent));
}

.shop-title::after {
    left: calc(100% + 15px);
    background: linear-gradient(90deg, var(--accent), transparent);
}

.shop-subtitle {
    color: var(--text-light);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
}

.shop-subtitle::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* Decorative diamond */
.shop-header::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    transform: rotate(45deg);
    margin: 1.25rem auto 0;
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem 2rem;
}

.shop-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

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

.shop-card-image {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.shop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.shop-badge.new {
    background: var(--accent);
    color: var(--primary);
}

.shop-card-content {
    padding: 0.75rem;
}

.shop-card-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.shop-card-brand {
    font-size: 0.55rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 0.35rem;
}

.shop-card-desc {
    font-size: 0.7rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.add-to-cart-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.add-to-cart-btn svg {
    width: 16px;
    height: 16px;
}

.add-to-cart-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.add-to-cart-btn.added {
    background: #4CAF50;
    color: white;
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 90%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    z-index: 1101;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.cart-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    color: var(--primary);
}

.cart-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--cream);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s ease;
}

.cart-close:hover {
    background: var(--primary);
    color: var(--white);
}

.cart-close svg {
    width: 18px;
    height: 18px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--primary);
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary);
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.cart-item-qty {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    align-self: flex-start;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 0.25rem;
}

.cart-item-remove svg {
    width: 16px;
    height: 16px;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.cart-empty svg {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    background: var(--cream);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.cart-total span:last-child {
    font-size: 1.3rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: var(--accent);
    color: var(--primary);
}

/* Responsive */
@media (min-width: 768px) {
    .shop-header {
        padding: 4rem 2rem 2.5rem;
    }

    .shop-title {
        font-size: 2.8rem;
    }

    .shop-title::before,
    .shop-title::after {
        width: 60px;
    }

    .shop-subtitle {
        font-size: 0.9rem;
        letter-spacing: 4px;
    }

    .shop-subtitle::before {
        width: 80px;
    }

    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        padding: 0 2rem 3rem;
    }

    .shop-card-image {
        height: 180px;
    }

    .shop-card-content h3 {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .shop-section {
        padding-top: 100px;
    }

    .shop-header {
        padding: 4rem 2rem 3rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .shop-title {
        font-size: 3.2rem;
    }

    .shop-title::before,
    .shop-title::after {
        width: 80px;
    }

    .shop-subtitle {
        font-size: 1rem;
        letter-spacing: 5px;
    }

    .shop-subtitle::before {
        width: 100px;
    }

    .shop-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem 4rem;
    }

    .shop-card-image {
        height: 220px;
    }

    .shop-card-content {
        padding: 1.2rem;
    }

    .shop-card-content h3 {
        font-size: 1.1rem;
    }

    /* Cart sidebar desktop */
    .cart-sidebar {
        width: 400px;
    }
}

@media (min-width: 1400px) {
    .shop-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1400px;
    }

    .shop-card-image {
        height: 240px;
    }
}
