/* ==================== SHOP SPECIFIC STYLES ==================== */

.cart-icon {
    position: relative;
    cursor: pointer;
    margin-left: 20px;
    padding: 10px;
    transition: var(--transition);
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-icon i {
    font-size: 1.5rem;
    color: var(--primary-gold);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-gold);
    color: var(--black);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}



.shop-hero {
    height: 40vh;
    background: linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.7)),
                url('https://images.unsplash.com/photo-1593095948071-474c5cc2989d?w=1920') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 70px;
}

.shop-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.shop-hero p {
    font-size: 1.3rem;
    color: var(--light-gray);
}

.shop-layout {
    display: block;
    margin-top: 40px;
    position: relative;
}

.shop-sidebar {
    background: var(--dark-gray);
    border-radius: 15px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    border: 2px solid var(--primary-gold);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.shop-sidebar.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--black);
    border-bottom: 2px solid var(--primary-gold);
    flex-shrink: 0;
}

.filter-header h3 {
    margin: 0;
    color: var(--primary-gold);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-filter-btn {
    background: none;
    border: none;
    color: var(--light-gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: var(--transition);
}

.close-filter-btn:hover {
    color: var(--primary-gold);
    transform: rotate(90deg);
}

.filter-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    padding: 30px;
    min-height: 0;
}

.filter-content::-webkit-scrollbar {
    width: 8px;
}

.filter-content::-webkit-scrollbar-track {
    background: var(--black);
    border-radius: 4px;
}

.filter-content::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 4px;
}

.filter-content::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gold);
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.filter-overlay.active {
    display: flex;
}

.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-modal-overlay.active {
    display: flex;
}

.product-modal {
    background: var(--dark-gray);
    border-radius: 16px;
    border: 2px solid var(--primary-gold);
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    padding-top: 44px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.product-modal .close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--black);
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.product-modal .close-modal:hover {
    background: var(--primary-gold);
    color: var(--black);
    transform: rotate(90deg);
}

.product-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    overflow-y: auto;
    max-height: 85vh;
}

.product-modal-image img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    max-height: 380px;
}

.product-modal-info h2 {
    margin-bottom: 10px;
}

.product-modal-category {
    display: inline-block;
    color: var(--primary-gold);
    font-weight: 600;
    margin-bottom: 10px;
}

.product-modal-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin: 15px 0;
}

.product-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.product-modal-actions .btn {
    flex: 1;
    min-width: 160px;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    white-space: nowrap;
}

.filter-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--medium-gray);
}

.filter-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-actions {
    display: flex;
    gap: 10px;
    padding: 20px 30px;
    border-top: 2px solid var(--medium-gray);
    background: var(--black);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.filter-actions .btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: var(--medium-gray);
    color: var(--white);
    border: 2px solid var(--medium-gray);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--light-gray);
    border-color: var(--light-gray);
    color: var(--black);
}

.filter-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-gold);
}

.category-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: var(--transition);
    user-select: none;
    position: relative;
    z-index: 1;
}

.filter-option:hover {
    background: var(--medium-gray);
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-gold);
    position: relative;
    z-index: 2;
}

.filter-option span {
    color: var(--light-gray);
    font-size: 0.95rem;
    cursor: pointer;
}

.price-filter {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#price-range {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: var(--medium-gray);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

#price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-gold);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

#price-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-gold);
    cursor: pointer;
    border: none;
    position: relative;
    z-index: 2;
}

.price-display {
    display: flex;
    justify-content: space-between;
    color: var(--light-gray);
    font-size: 0.9rem;
}

.sort-select {
    width: 100%;
    padding: 12px;
    background: var(--black);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.shop-main {
    min-height: 600px;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--medium-gray);
    flex-wrap: wrap;
    gap: 15px;
}

.shop-header h2 {
    font-size: 2rem;
    color: var(--primary-gold);
}

.product-count {
    color: var(--light-gray);
    font-size: 1rem;
}

.products-grid-full {
    display: grid;
        grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--dark-gray);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 25px;
    background: var(--black);
    position: relative;
    transform: scale(0.95);
}

.cart-header h3 {
    font-size: 1.5rem;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover {
    transform: scale(1);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    background: var(--black);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    border: 1px solid var(--medium-gray);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cart-item-details p {
    color: var(--light-gray);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--medium-gray);
    border-radius: 5px;
    padding: 5px;
}

.quantity-controls button {
    width: 25px;
    height: 25px;
    background: var(--primary-gold);
    border: none;
    border-radius: 3px;
    color: var(--black);
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

.quantity-controls button:hover {
    background: var(--dark-gold);
}

.quantity-controls span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.remove-item {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: var(--transition);
}

.remove-item:hover {
    transform: scale(1.2);
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--light-gray);
}

.empty-cart i {
    font-size: 4rem;
    color: var(--medium-gray);
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.cart-footer {
    padding: 25px;
    background: var(--black);
    border-top: 2px solid var(--medium-gray);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
}

.total-amount {
    color: var(--primary-gold);
    font-size: 1.8rem;
}

.btn-checkout {
    width: 100%;
    margin-bottom: 10px;
    padding: 15px;
    font-size: 1rem;
}

.cart-footer .btn-secondary {
    width: 100%;
    padding: 12px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
}

.cart-overlay.active {
    display: block;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .products-grid-full {
           grid-template-columns: repeat(3, 1fr);
    }

    .cart-sidebar {
        width: 380px;
        right: -380px;
    }

    .shop-sidebar {
        width: 85%;
        max-width: 450px;
    }
}

@media (max-width: 768px) {
    .shop-hero {
        height: 35vh;
    }

    .shop-hero h1 {
        font-size: 2rem;
    }

    .products-grid-full {
           grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .shop-header {
        align-items: flex-start;
    }

    .shop-header > div {
        flex: 1;
    }

    .filter-toggle-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .shop-sidebar {
        width: 90%;
        max-width: 400px;
    }

    .product-modal-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .product-modal-image img {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .products-grid-full {
           grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cart-icon {
        margin-left: 10px;
    }

    .shop-hero {
        height: 30vh;
    }

    .shop-hero h1 {
        font-size: 1.5rem;
    }

    .shop-hero p {
        font-size: 1rem;
    }

    .shop-header {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-header > div {
        width: 100%;
    }

    .filter-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .sort-select {
        width: 100%;
    }

    .product-item-content {
        padding: 12px;
    }

    .product-item h4 {
        font-size: 0.95rem;
    }

    .product-price-admin {
        font-size: 1.1rem;
    }

    .cart-item {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }

    .cart-item-image {
        width: 100%;
        height: 120px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .shop-sidebar {
        width: 95%;
        max-width: none;
        max-height: 90vh;
    }

    .filter-header {
        padding: 15px 20px;
    }

    .filter-header h3 {
        font-size: 1.1rem;
    }

    .filter-content {
        padding: 20px;
    }

    .filter-section h3 {
        font-size: 1.1rem;
    }

    .filter-actions {
        flex-direction: column;
        padding: 15px 20px;
    }

    .filter-actions .btn {
        width: 100%;
        min-width: auto;
    }

    .product-item {
        font-size: 0.9rem;
    }

    .product-modal {
        max-height: 90vh;
    }

    .product-modal-content {
        padding: 18px;
    }

    .product-modal-price {
        font-size: 1.6rem;
    }
}
