/**
 * Standard Shop Modal Styles
 * Complete modal styling for standard shop page
 * Customizable and independent from fullscreen shop
 */

/* ========================================
   Modal Overlays
   ======================================== */

/* Body lock for filter modal */
body.filter-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.standard-shop-page .cart-modal-overlay,
.standard-shop-page .product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8); /* Darker overlay for standard shop */
    z-index: var(--z-modal-overlay);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px); /* Modern blur effect */
}

/* Filter modal overlay - full page scrolling like document */
.standard-shop-page .filter-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: var(--z-modal-overlay);
    display: none;
    overflow-y: auto; /* Let the overlay scroll like a page */
    -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
    overscroll-behavior-y: contain; /* Prevent pull-to-refresh */
    backdrop-filter: blur(5px);
}

.standard-shop-page .cart-modal-overlay.active,
.standard-shop-page .product-modal-overlay.active,
.standard-shop-page .filter-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   Modal Containers
   ======================================== */

.standard-shop-page .cart-modal,
.standard-shop-page .product-modal {
    background: white;
    border-radius: 0; /* Full screen on mobile */
    max-width: 100%; /* Full width on mobile */
    width: 100%;
    max-height: 100vh; /* Full height on mobile */
    height: 100%; /* Full height on mobile */
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

/* Filter modal - full viewport with natural scrolling */
.standard-shop-page .filter-modal {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    min-height: 100vh; /* Full viewport height minimum */
    max-height: none !important; /* Override fullscreen shop's 90vh limit */
    overflow: visible; /* Let content flow naturally */
    position: relative;
    /* Create a new stacking/context compositing layer so the overlay's
       backdrop-filter does not visually bleed through nested dropdowns */
    isolation: isolate;
    display: flex;
    flex-direction: column;
    margin: 0 auto; /* Center horizontally */
    padding-top: 0; /* Remove top padding */
    padding-bottom: 40px; /* Increased bottom padding */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
}

/* ========================================
   Modal Headers
   ======================================== */

.standard-shop-page .cart-modal-header,
.standard-shop-page .product-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #f9fafb; /* Light gray header */
}

/* Filter modal header */
.standard-shop-page .filter-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Don't shrink */
    background: #f9fafb;
}

.standard-shop-page .cart-modal-title,
.standard-shop-page .product-modal-title,
.standard-shop-page .filter-modal-title {
    font-size: 20px; /* Smaller on mobile */
    font-weight: 700;
    margin: 0;
    color: #111827;
    letter-spacing: -0.5px;
}

/* Close Buttons */
.standard-shop-page .cart-modal-close,
.standard-shop-page .product-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.standard-shop-page .cart-modal-close:hover,
.standard-shop-page .product-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Fix product modal close button positioning - override shared modal CSS */
.standard-shop-page .product-modal-header {
    position: relative; /* Make header the positioning context */
}

.standard-shop-page .product-modal-overlay .product-modal-close {
    position: static; /* Reset absolute positioning to normal flow */
    top: auto;
    right: auto;
    background: none; /* Remove dark background from shared CSS */
    color: #6b7280; /* Use standard shop color */
    z-index: auto; /* Reset z-index */
}

/* ========================================
   Modal Bodies
   ======================================== */

.standard-shop-page .cart-modal-body {
    flex: 1;
    overflow: visible; /* Don't create nested scroll */
    padding: 24px;
    padding-bottom: 120px; /* Space for sticky buttons */
}

.standard-shop-page .filter-modal-body {
    flex: 1;
    overflow: visible; /* No internal scrolling - content flows naturally */
    padding: 30px 30px 100px 30px; /* Adjusted padding at bottom */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center filter content */
    background: white; /* Ensure white background extends through body */
    min-height: 1300px;
}

.standard-shop-page .product-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    gap: 24px; /* Smaller gap on mobile */
    align-items: start;
}

/* ========================================
   Product Modal Specific
   ======================================== */

/* Product Info Container */
.standard-shop-page .product-modal-info {
    margin-bottom: 24px;
}

/* Gallery Section */
.standard-shop-page .product-modal-gallery {
    position: relative;
}

.standard-shop-page .gallery-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    position: relative;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.standard-shop-page .gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    display: block;
}

/* Gallery Thumbnails */
.standard-shop-page .gallery-thumbnails,
.standard-shop-page .product-modal-gallery-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.standard-shop-page .gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.standard-shop-page .gallery-thumbnails::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.standard-shop-page .gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.standard-shop-page .gallery-thumb,
.standard-shop-page .gallery-dot {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.standard-shop-page .gallery-thumb:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.standard-shop-page .gallery-thumb.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.standard-shop-page .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery Navigation Arrows */
.standard-shop-page .gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: #374151;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: var(--z-base);
}

.standard-shop-page .gallery-arrow:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.standard-shop-page .gallery-arrow.prev {
    left: 12px;
}

.standard-shop-page .gallery-arrow.next {
    right: 12px;
}

.standard-shop-page .gallery-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Gallery Fullscreen Button */
.standard-shop-page .gallery-fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    z-index: var(--z-product-card);
}

.standard-shop-page .gallery-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Image Counter */
.standard-shop-page .gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: var(--z-product-card);
}

/* Product Info Section */
.standard-shop-page .product-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.standard-shop-page .product-modal-price {
    font-size: 32px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 8px;
}

.standard-shop-page .product-modal-stock {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

.standard-shop-page .product-modal-stock.in-stock {
    color: #059669;
}

.standard-shop-page .product-modal-stock.out-of-stock {
    color: #dc2626;
}

/* Add to Cart Section */
.standard-shop-page .product-modal-add-to-cart {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

/* Quantity Selector - Updated to match HTML */
.standard-shop-page .quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.standard-shop-page .quantity-btn {
    background: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s ease;
    line-height: 1;
}

.standard-shop-page .quantity-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.standard-shop-page .quantity-btn.minus {
    border-right: 1px solid #e5e7eb;
}

.standard-shop-page .quantity-btn.plus {
    border-left: 1px solid #e5e7eb;
}

.standard-shop-page .quantity-input {
    border: none;
    width: 60px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 8px;
    background: #f9fafb;
}

/* Modal Add to Cart Button - Updated selector */
.standard-shop-page .modal-add-to-cart-btn {
    flex: 1;
    padding: 16px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.standard-shop-page .modal-add-to-cart-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

.standard-shop-page .modal-add-to-cart-btn:active {
    transform: translateY(0);
}

.standard-shop-page .modal-add-to-cart-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.standard-shop-page .modal-add-to-cart-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Product Descriptions */
.standard-shop-page .product-modal-short-description {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
}

.standard-shop-page .product-modal-description-section {
    margin-top: 24px;
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
}

.standard-shop-page .description-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    text-align: left;
}

.standard-shop-page .description-toggle:hover {
    color: #3b82f6;
}

.standard-shop-page .toggle-icon {
    transition: transform 0.3s ease;
}

.standard-shop-page .description-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.standard-shop-page .product-modal-description {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.8;
    color: #6b7280;
}

/* ========================================
   Cart Modal Specific
   ======================================== */

.standard-shop-page .cart-modal-body .woocommerce-mini-cart-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
}

.standard-shop-page .cart-modal-body .woocommerce-mini-cart-item:last-child {
    border-bottom: none;
}

/* Remove button */
.standard-shop-page .cart-modal-body .remove {
    position: absolute;
    top: 20px;
    right: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    border-radius: 50%;
    color: #dc2626;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.standard-shop-page .cart-modal-body .remove:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

/* Cart item thumbnail */
.standard-shop-page .cart-item-thumbnail {
    flex-shrink: 0;
}

.standard-shop-page .cart-item-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* Cart totals */
.standard-shop-page .woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-top: 2px solid #e5e7eb;
    margin-top: 24px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

/* Cart buttons */
.standard-shop-page .woocommerce-mini-cart__buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.standard-shop-page .woocommerce-mini-cart__buttons .button {
    flex: 1;
    padding: 16px 24px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.standard-shop-page .woocommerce-mini-cart__buttons .button.checkout {
    background: #10b981;
    color: white;
    border: none;
}

.standard-shop-page .woocommerce-mini-cart__buttons .button.checkout:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}

/* Hide view cart button */
.standard-shop-page .woocommerce-mini-cart__buttons .button.wc-forward:not(.checkout) {
    display: none !important;
}

/* Empty cart */
.standard-shop-page .empty-cart-message {
    text-align: center;
    padding: 80px 20px;
}

.standard-shop-page .woocommerce-mini-cart__empty-message {
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* ========================================
   Filter Modal Specific
   ======================================== */

.standard-shop-page .filter-modal {
    max-width: 1000px; /* Wider for widescreen displays */
}

.standard-shop-page .filter-modal-content {
    padding: 0;
    background: white; /* Ensure white background */
    min-height: 100%; /* Fill the modal container */
}

.standard-shop-page .filter-group {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.standard-shop-page .filter-group:last-child {
    margin-bottom: 40px; /* Add space at bottom for sort section */
}

/* Specific styling for sort filter group to ensure background coverage */
.standard-shop-page .sort-filter-group {
    margin-bottom: 60px; /* Extra margin for sort section */
    background: white; /* White background to match other sections */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

/* Ensure dropdown content has white background in filter modal */
.standard-shop-page .filter-modal .dropdown-content {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
}

/* Ensure sort filter group has enough height for dropdown */
.standard-shop-page .filter-modal .sort-filter-group {
    min-height: 120px; /* Accommodate expanded dropdown */
}

/* Ensure filters-grid container has proper styling in standard shop */
.standard-shop-page .filter-modal .filters-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    background: transparent; /* Let individual filter groups handle backgrounds */
    padding-bottom: 40px; /* Extra padding at bottom */
    align-items: stretch; /* Make all items full width */
}

.standard-shop-page .filter-label {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    display: block;
    text-align: center; /* Center the label text */
}

.standard-shop-page .filter-modal-header {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.standard-shop-page .filter-modal-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.standard-shop-page .filter-modal-clear,
.standard-shop-page .filter-modal-apply {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.standard-shop-page .filter-modal-clear {
    background: #6b7280;
    color: white;
}

.standard-shop-page .filter-modal-clear:hover {
    background: #4b5563;
}

.standard-shop-page .filter-modal-apply {
    background: #3b82f6;
    color: white;
}

.standard-shop-page .filter-modal-apply:hover {
    background: #2563eb;
}

/* Filter Modal Footer */
.standard-shop-page .filter-modal-footer {
    padding: 20px 30px;
    background: white; /* Ensure white background in footer */
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: auto; /* Push to bottom */
}

/* ========================================
   Loading States
   ======================================== */

.standard-shop-page .product-modal-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* Product Modal Error State */
.standard-shop-page .product-modal-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #dc2626;
}

.standard-shop-page .loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========================================
   Secondary Actions (Wishlist & Share)
   ======================================== */

.standard-shop-page .product-modal-secondary-actions {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.standard-shop-page .product-modal-wishlist {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Wishlist Button Styling */
.standard-shop-page .product-modal-wishlist .bb-wishlist-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    transition: all 0.2s ease;
    min-height: 44px;
    box-sizing: border-box;
    width: 100%;
}

.standard-shop-page .product-modal-wishlist .bb-wishlist-button:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

.standard-shop-page .product-modal-wishlist .bb-wishlist-button.in-wishlist {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

/* Share Button and Dropdown */
.standard-shop-page .product-modal-share {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.standard-shop-page .share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    transition: all 0.2s ease;
    min-height: 44px;
    box-sizing: border-box;
    width: 100%;
}

.standard-shop-page .share-button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.standard-shop-page .share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: var(--z-product-card);
    min-width: 200px;
    padding: 8px;
}

.standard-shop-page .share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: #374151;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
}

.standard-shop-page .share-option:hover {
    background: #f3f4f6;
}

/* ========================================
   Vendor/Seller Information
   ======================================== */

.standard-shop-page .product-sold-by {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
}

.standard-shop-page .sold-by-label {
    color: #6b7280;
    font-weight: 500;
}

.standard-shop-page .sold-by-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    transition: all 0.2s ease;
}

.standard-shop-page .sold-by-link:hover {
    color: #3b82f6;
}

.standard-shop-page .sold-by-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   Message Seller Section
   ======================================== */

.standard-shop-page .message-seller-section {
    margin-top: 16px;
}

.standard-shop-page .message-seller-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
    color: #1e40af;
}

.standard-shop-page .message-seller-toggle:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.standard-shop-page .message-seller-toggle[aria-expanded="true"] {
    border-radius: 8px 8px 0 0;
}

.standard-shop-page .message-seller-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.standard-shop-page .message-icon {
    font-size: 20px;
    margin-right: 8px;
}

.standard-shop-page .toggle-arrow {
    transition: transform 0.3s ease;
    color: #6b7280;
}

.standard-shop-page .message-seller-form {
    border: 1px solid #bfdbfe;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 16px;
    background: #f9fafb;
}

.standard-shop-page .message-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.standard-shop-page .message-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.standard-shop-page .message-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.standard-shop-page .character-count {
    font-size: 13px;
    color: #6b7280;
}

.standard-shop-page .message-actions {
    display: flex;
    gap: 8px;
}

.standard-shop-page .message-cancel-btn,
.standard-shop-page .message-send-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.standard-shop-page .message-cancel-btn {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.standard-shop-page .message-cancel-btn:hover {
    background: #f3f4f6;
}

.standard-shop-page .message-send-btn {
    background: #3b82f6;
    color: white;
}

.standard-shop-page .message-send-btn:hover {
    background: #2563eb;
}

.standard-shop-page .message-send-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.standard-shop-page .message-status {
    margin-top: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.standard-shop-page .message-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.standard-shop-page .message-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ========================================
   Custom Fields Section
   ======================================== */

.standard-shop-page .product-custom-fields {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.standard-shop-page .custom-fields-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #111827;
}

.standard-shop-page .custom-field {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.standard-shop-page .custom-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.standard-shop-page .field-label {
    font-weight: 500;
    color: #6b7280;
    min-width: 140px;
    font-size: 14px;
}

.standard-shop-page .field-value {
    color: #111827;
    font-size: 14px;
    flex: 1;
}

/* ========================================
   Stock Status Styling
   ======================================== */

.standard-shop-page .product-modal-stock {
    margin-bottom: 16px;
}

.standard-shop-page .stock-available {
    color: #059669;
    font-weight: 500;
}

.standard-shop-page .stock-out {
    color: #dc2626;
    font-weight: 500;
}

/* ========================================
   Gallery Lightbox
   ======================================== */

.standard-shop-page .gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-notification);
    display: none;
    align-items: center;
    justify-content: center;
}

.standard-shop-page .gallery-lightbox.active {
    display: flex;
}

.standard-shop-page .lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.standard-shop-page .lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.standard-shop-page .lightbox-image.zoomed {
    cursor: zoom-out;
    max-width: none;
    max-height: none;
    transform: scale(2);
}

.standard-shop-page .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.standard-shop-page .lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.standard-shop-page .lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Lightbox Navigation Arrows */
.standard-shop-page .lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: var(--z-product-card);
}

.standard-shop-page .lightbox-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.standard-shop-page .lightbox-arrow.prev {
    left: 30px;
}

.standard-shop-page .lightbox-arrow.next {
    right: 30px;
}

.standard-shop-page .lightbox-arrow svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Hide arrows when image is zoomed */
.standard-shop-page .lightbox-image.zoomed ~ .lightbox-arrow {
    opacity: 0;
    pointer-events: none;
}

/* ========================================
   Gallery Dots
   ======================================== */

.standard-shop-page .gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.standard-shop-page .gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.standard-shop-page .gallery-dot:hover {
    background: #6b7280;
}

.standard-shop-page .gallery-dot.active {
    background: #3b82f6;
    width: 24px;
    border-radius: 4px;
}

/* ========================================
   BuddyBoss Price Display
   ======================================== */

.standard-shop-page .bbup-dollar {
    font-size: 24px;
    color: #1e40af;
}

.standard-shop-page .bbup-free-label {
    font-size: 28px;
    color: #059669;
    font-weight: 700;
}

/* ========================================
   Animations
   ======================================== */

/* fadeIn animation - moved to animations.css */

/* slideUp animation - moved to animations.css */

/* spin animation - moved to animations.css */

/* ========================================
   Responsive Design
   ======================================== */

/* Mobile-first base styles */
.standard-shop-page .cart-modal-overlay,
.standard-shop-page .product-modal-overlay,
.standard-shop-page .filter-modal-overlay {
    padding: 0; /* No padding on mobile */
}

/* Mobile filter modal takes full screen */
@media (max-width: 799px) {
    .standard-shop-page .filter-modal {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Reset column assignments for mobile */
.standard-shop-page .product-modal-gallery,
.standard-shop-page .product-modal-info,
.standard-shop-page .product-modal-short-description,
.standard-shop-page .product-modal-description-section,
.standard-shop-page .product-sold-by,
.standard-shop-page .message-seller-section,
.standard-shop-page .product-custom-fields {
    grid-column: 1;
    position: relative;
}

.standard-shop-page .product-modal-add-to-cart {
    flex-wrap: wrap;
}

.standard-shop-page .product-modal-quantity {
    width: 100%;
}

.standard-shop-page .modal-add-to-cart-button {
    width: 100%;
}

/* Tablet and Desktop adjustments - 800px and up */
@media (min-width: 800px) {
    .standard-shop-page .cart-modal,
    .standard-shop-page .product-modal {
        max-height: 90vh;
        height: auto;
        max-width: 900px;
        border-radius: 12px;
    }
    
    .standard-shop-page .filter-modal {
        min-height: 100vh; /* Keep full height minimum on desktop too */
        max-width: 900px;
        border-radius: 12px;
    }
    
    .standard-shop-page .cart-modal-overlay,
    .standard-shop-page .product-modal-overlay {
        padding: 20px;
    }
    
    .standard-shop-page .product-modal-body {
        grid-template-columns: 1fr 1fr; /* Two columns on tablet+ */
        gap: 32px;
    }
    
    .standard-shop-page .cart-modal-title,
    .standard-shop-page .product-modal-title,
    .standard-shop-page .filter-modal-title {
        font-size: 24px;
    }
    
    .standard-shop-page .product-modal-add-to-cart {
        flex-wrap: nowrap;
    }
    
    .standard-shop-page .product-modal-quantity {
        width: auto;
    }
    
    .standard-shop-page .modal-add-to-cart-button {
        width: auto;
    }
    
    /* Two Column Layout Structure for tablet/desktop */
    .standard-shop-page .product-modal-gallery {
        grid-column: 1;
        position: sticky;
        top: 0;
    }
    
    .standard-shop-page .product-modal-info,
    .standard-shop-page .product-modal-short-description,
    .standard-shop-page .product-modal-description-section,
    .standard-shop-page .product-sold-by,
    .standard-shop-page .message-seller-section,
    .standard-shop-page .product-custom-fields {
        grid-column: 2;
        position: relative;
    }
}
