/* Shop Page Specific Styles */

/* Shop Hero Section - smaller than main hero */
.shop-hero {
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
    margin-top: 70px;
    background-image: linear-gradient(
        rgba(39, 35, 34, 0.75), 
        rgba(39, 35, 34, 0.9)
    ), url('https://images.pexels.com/photos/7947733/pexels-photo-7947733.jpeg');
    background-blend-mode: soft-light;
    filter: sepia(30%) brightness(0.9) contrast(1.1);
    position: relative;
    background-size: cover;
    background-position: center;
}

.shop-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--noir);
    opacity: 0.25;
    mix-blend-mode: color;
    pointer-events: none;
}

.shop-hero .container {
    position: relative;
    z-index: 1;
}

.shop-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.shop-hero p {
    font-family: var(--accent-font);
    font-size: 1.25rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Shop Content Layout */
.shop-content {
    padding: var(--section-spacing) 0;
}

.shop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* Sidebar Styles */
.shop-sidebar {
    margin-bottom: 2rem;
}

.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(133, 118, 112, 0.2);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 0.5rem;
}

.filter-list a {
    font-family: var(--body-font);
    display: block;
    padding: 0.25rem 0;
    color: var(--ivory);
    opacity: 0.8;
    transition: var(--transition);
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--gold);
    opacity: 1;
}

.filter-list a.active {
    font-weight: 700;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
}

.filter-tag {
    display: block;
    padding: 0.3rem 0.8rem;
    font-size: 0.875rem;
    border: 1px solid rgba(133, 118, 112, 0.5);
    border-radius: 20px;
    transition: var(--transition);
    font-family: var(--accent-font);
    color: var(--ivory);
}

.filter-tag:hover {
    border-color: var(--gold);
    background-color: rgba(197, 164, 109, 0.1);
    color: var(--gold);
}

.price-slider {
    padding: 0.5rem 0;
}

.slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--mushroom), var(--gold));
    outline: none;
    border-radius: 5px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: none;
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--mushroom);
    font-family: var(--accent-font);
}

/* Shop Controls */
.shop-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(133, 118, 112, 0.2);
}

.showing-results {
    font-family: var(--accent-font);
    color: var(--mushroom);
    font-size: 0.9rem;
}

.showing-results span {
    color: var(--ivory);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-options label {
    font-family: var(--accent-font);
    font-size: 0.9rem;
    color: var(--mushroom);
}

.sort-options select {
    padding: 0.35rem 0.5rem;
    border: 1px solid rgba(133, 118, 112, 0.3);
    border-radius: 2px;
    background-color: rgba(39, 35, 34, 0.8);
    color: var(--ivory);
    font-family: var(--accent-font);
    cursor: pointer;
}

/* Product Styling Additions */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-image {
    aspect-ratio: 1/1; /* Square images for consistency */
    overflow: hidden;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(197, 164, 109, 0.85);
    color: var(--noir);
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-size: 0.75rem;
    font-family: var(--heading-font);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.product-badge.sold {
    background: rgba(133, 118, 112, 0.85);
}

.product-description {
    margin: 0.5rem 0 1rem;
    font-size: 0.875rem;
    color: var(--mushroom);
    line-height: 1.4;
}

.sold-out button {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Special handling for the cow skull image */
.product-card:nth-child(9) .product-image img {
    object-position: center 70%; /* Move image down to show more of the bottom part */
    transform: scale(1.05); /* Slight zoom to ensure good coverage */
}

/* Maintain this positioning even on hover */
.product-card:nth-child(9):hover .product-image img {
    object-position: center 70%;
    transform: scale(1.1); /* Still have a slight zoom effect on hover */
}

/* Special handling for the witch bells image */
.product-card:nth-child(5) .product-image img {
    object-position: center 70%; /* Move image down to show more of the bottom part */
    transform: scale(1.05); /* Slight zoom to ensure good coverage */
}

/* Maintain this positioning even on hover */
.product-card:nth-child(5):hover .product-image img {
    object-position: center 70%;
    transform: scale(1.1); /* Still have a slight zoom effect on hover */
}

/* Pagination */
.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-number, .pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-family: var(--heading-font);
    border: 1px solid rgba(133, 118, 112, 0.3);
    transition: var(--transition);
}

.page-number:hover:not(.active),
.pagination-arrow:hover:not(.disabled) {
    border-color: var(--gold);
    color: var(--gold);
}

.page-number.active {
    background-color: var(--gold);
    color: var(--noir);
    border-color: var(--gold);
}

.pagination-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Featured Collection */
.featured-collection {
    padding: var(--section-spacing) 0;
    background-color: rgba(133, 118, 112, 0.1);
    text-align: center;
}

.collection-description {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-family: var(--accent-font);
}

/* Active Nav Link */
.nav-links a.active {
    color: var(--gold);
}

/* Product Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(39, 35, 34, 0.9);
    z-index: 2000;
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.product-modal {
    background-color: var(--noir);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--card-radius);
    border: 1px solid rgba(133, 118, 112, 0.3);
    position: relative;
    overflow: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .product-modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--ivory);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    background-color: rgba(133, 118, 112, 0.2);
    color: var(--gold);
}

.modal-content {
    display: flex;
    flex-direction: column;
}

.modal-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.modal-product-details {
    padding: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(133, 118, 112, 0.4) transparent;
}

.modal-product-details::-webkit-scrollbar {
    width: 6px;
}

.modal-product-details::-webkit-scrollbar-track {
    background: transparent;
}

.modal-product-details::-webkit-scrollbar-thumb {
    background: rgba(133, 118, 112, 0.4);
    border-radius: 3px;
}

.modal-product-details::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

.product-category {
    color: var(--mushroom);
    font-family: var(--accent-font);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.modal-product-details h2 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.modal-price {
    color: var(--gold);
    font-family: var(--accent-font);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.product-details-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(133, 118, 112, 0.2);
}

.product-details-section:last-of-type {
    border-bottom: none;
}

.product-details-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--ivory);
}

.product-details-section ul {
    list-style: none;
    margin-left: 1rem;
}

.product-details-section li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.product-details-section li:before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.7rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.quantity-selector {
    display: flex;
    height: 40px;
    overflow: hidden;
    border: 1px solid rgba(133, 118, 112, 0.3);
    border-radius: var(--card-radius);
}

.quantity-btn {
    width: 40px;
    background: none;
    border: none;
    color: var(--ivory);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: rgba(133, 118, 112, 0.2);
}

.quantity-selector input {
    width: 40px;
    text-align: center;
    border: none;
    background: none;
    color: var(--ivory);
    font-family: var(--accent-font);
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    width: 100%;
}

/* Enhanced Mobile Responsiveness for Shop */

.shop-filters {
    position: fixed;
    left: -100%;
    top: 0;
    width: 85%;
    height: 100vh;
    z-index: 9999;
    background-color: rgba(39, 35, 34, 0.98);
    transition: left 0.3s ease;
    padding: 1rem;
    overflow-y: auto;
}

.shop-filters.active {
    left: 0;
}

.filter-close {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: none;
    border: none;
    color: var(--ivory);
    font-size: 1.5rem;
    cursor: pointer;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    background-color: rgba(133, 118, 112, 0.1);
    border: 1px solid rgba(133, 118, 112, 0.3);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-family: var(--accent-font);
    color: var(--ivory);
    cursor: pointer;
    margin-bottom: 1rem;
}

.filter-toggle span {
    margin-right: 0.5rem;
}

/* Mobile-optimized sort and filter controls */
.shop-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Media queries for larger screens */
@media screen and (min-width: 576px) {
    .shop-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 768px) {
    /* Show sidebar filters on tablet and above */
    .shop-filters {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        background-color: transparent;
        overflow-y: visible;
    }
    
    .filter-close {
        display: none;
    }
    
    .filter-toggle {
        display: none;
    }
    
    .shop-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .shop-grid {
        grid-template-columns: 250px 1fr;
    }
    
    .modal-content {
        flex-direction: row;
    }
    
    .modal-product-image {
        width: 50%;
        height: auto;
    }
}

@media screen and (min-width: 992px) {
    .shop-grid {
        grid-template-columns: 280px 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Replace "Add to Cart" with "Enchant" or similar mystical term */
.product-info-btn {
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.product-info-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(197, 164, 109, 0.2), transparent);
    transition: left 0.8s ease;
}

.product-info-btn:hover::before {
    left: 100%;
}

.product-info-btn:hover {
    border-color: var(--gold);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(133, 118, 112, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(133, 118, 112, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(133, 118, 112, 0.5) rgba(133, 118, 112, 0.1);
}

/* Success notification for cart addition */
.cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--noir);
    border: 1px solid var(--gold);
    border-radius: var(--card-radius);
    padding: 1rem 1.5rem;
    color: var(--ivory);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 2000;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.cart-notification-icon {
    color: var(--gold);
    font-size: 1.5rem;
}

.cart-notification-content {
    font-family: var(--accent-font);
}

.cart-notification-content strong {
    color: var(--gold);
}
