/* Import Google Font for Cassette Text */
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Scroll to products link styling - used within SMF infobox messages */
.scroll-to-products {
    color: #047857 !important;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 4px;
}

.scroll-to-products:hover {
    color: #065f46 !important;
    text-decoration: underline;
}

/* Multi-variant selection form with summary */
.variant-section { margin: 24px 0; padding: 20px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e7eb; }
.multi-variant-form { display: grid; grid-template-columns: 1fr 260px; gap: 20px; }

.variant-list { display: flex; flex-direction: column; gap: 12px; }
.variant-row { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: #fff; border-radius: 6px; border: 1px solid #e5e7eb; }
.variant-checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; }
.variant-checkbox input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.checkbox-label { font-size: 15px; color: #374151; user-select: none; }
.variant-price { font-weight: 600; color: #F8107D; font-size: 15px; }

.variant-summary { background: #fff; border-radius: 6px; border: 1px solid #e5e7eb; padding: 16px; position: sticky; top: 20px; }
.summary-header { font-weight: 700; font-size: 14px; margin-bottom: 12px; color: #111; }
.summary-items { margin-bottom: 12px; }
.summary-item { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: #374151; border-bottom: 1px solid #eee; }
.summary-item:last-child { border-bottom: none; }
.summary-empty { font-size: 13px; color: #9ca3af; font-style: italic; padding: 8px 0; }
.summary-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; padding-top: 12px; border-top: 2px solid #e5e7eb; color: #111; }
.total-price { color: #F8107D; }

.multi-variant-form .btn-primary { grid-column: 1 / -1; margin-top: 16px; }

@media (max-width: 768px) {
    .multi-variant-form { grid-template-columns: 1fr; }
    .variant-summary { position: static; }
}

/* Product Modal Styling */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal.show {
    opacity: 1;
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    height: auto;
    display: flex;
    flex-direction: column;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

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

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    position: relative;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
}

.modal-header i {
    margin-right: 10px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 25px;
    flex: 1 1 auto;
    overflow-y: auto !important;
    overflow-x: hidden;
    min-height: 0;
    max-height: calc(90vh - 140px);
    /* Custom scrollbar for webkit browsers */
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* File upload styling */
.form-input[type="file"] {
    padding: 8px;
    border: 2px dashed #e1e5e9;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.form-input[type="file"]:focus {
    border-color: #667eea;
    background: #f0f2ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.8em;
    color: #666;
    font-style: italic;
}

.modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    border-top: 1px solid #e1e5e9;
}

.btn-cancel,
.btn-save {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* File upload progress (for future enhancement) */
.upload-progress {
    width: 100%;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* Product list styling enhancements */
.product-images {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.product-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.audio-preview {
    margin-top: 10px;
}

.audio-preview audio {
    width: 100%;
    max-width: 200px;
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.2em;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 120px); /* Adjusted for mobile */
        overflow-y: auto !important;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }
    
    .btn-cancel,
    .btn-save {
        width: 100%;
    }
}

/* Products table enhancements for merch */
.products-table .merch-type {
    font-size: 11px;
    background: #f0f8ff;
    color: #2c5aa0;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 2px;
}

.products-table .product-sizes {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.products-table .product-materials {
    font-size: 10px;
    color: #888;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css");

/* Library Messages */
.library-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
}

/* ...rest of your CSS unchanged... */

.success-message {
    background: #4CAF50;
}

.error-message {
    background: #f44336;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

/* Theme-safe utilities and replacements for removed Bulma classes */
.site-nav{
    background: linear-gradient(135deg,#0b0b0b 0%, #121212 100%);
    padding: 12px 20px;
    color: #fff;
}
.site-brand{display:inline-block;vertical-align:middle}
.site-brand-link{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.brand-title{font-weight:800;font-size:18px}
.site-menu{float:right}
.site-menu-end{display:flex;gap:18px;align-items:center}
.site-menu-item{color:#ddd;text-decoration:none;padding:6px 10px;border-radius:6px}
.site-menu-item:hover{color:#fff;background:rgba(255,255,255,0.03)}

.text-white{color:#fff}
.text-muted{color:#9aa0a6}
.text-center{text-align:center}

/* product image figure / card-image helpers */
.product-image-figure{width:100%;height:100%;display:block}
.card-image{background:transparent;padding:0;margin:0}

.product-tag{position:absolute;top:12px;left:12px;background:#4CAF50;color:#fff;padding:6px 10px;border-radius:8px;font-weight:700;font-size:12px}
.product-tag.new{background:#FF6B35}

/* overlay play button used on product cards */
.overlay-btn{background:rgba(255,255,255,0.95);border-radius:50%;width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border:0;font-size:16px;cursor:pointer}

/* small debug panel for preview candidates (visible only during testing) */
#previewDebug{position:fixed;left:18px;bottom:18px;background:rgba(0,0,0,0.8);color:#fff;padding:10px;border-radius:8px;z-index:1300;max-width:420px;display:none;font-size:12px}
#previewDebug.visible{display:block}
#previewDebug .dbg-title{font-weight:700;margin-bottom:6px}
#previewDebug .dbg-url{word-break:break-all;opacity:0.9;margin-bottom:4px}

/* Additional polish: header/menu layout and card compatibility rules */
.site-nav{display:flex;align-items:center;justify-content:space-between;max-width:1200px;margin:0 auto;padding:10px 20px}
.site-brand-link .icon{font-size:20px;color:#fff}
.site-brand-link .brand-title{font-size:20px}
.site-menu{display:flex;align-items:center}
.site-menu-end{gap:14px}

/* Responsive collapse for navigation */
@media (max-width:768px){
    .site-nav{padding:10px}
    .site-menu{display:none}
}

/* Ensure product card internals match template .card/.card-content selectors */
.card{background:transparent;border-radius:12px}
.card-content{padding:18px}
.media{display:flex}
.media-content{flex:1}



/* Overlay button polish */
.overlay-btn{transition:transform .12s ease,box-shadow .12s ease}
.overlay-btn:hover{transform:scale(1.06);box-shadow:0 8px 18px rgba(0,0,0,0.25)}

/* Slight lift when card hovered (more subtle than before) */
.product-card:hover{transform:translateY(-6px)}

/* Badge refinements */
.product-tag{font-size:12px;padding:6px 10px;box-shadow:0 4px 12px rgba(0,0,0,0.12)}

/* Library grid spacing adjustments to match theme */
.library-grid{gap:22px;max-width:1200px;margin:0 auto;padding:0 20px 40px}
.library-grid.list-view .product-card{display:flex;gap:16px}
.library-grid.list-view .product-image img{width:220px;height:auto;object-fit:cover}

/* Make debug panel visually distinct but unobtrusive on dark themes */
#previewDebug{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif}

/* Always visible play badge */
.play-badge{position:absolute;left:12px;bottom:12px;background:rgba(248,16,125,0.95);color:#fff;border:none;width:44px;height:44px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-weight:700;cursor:pointer;z-index:20;box-shadow:0 8px 20px rgba(0,0,0,0.3);transition:transform .12s ease}
.play-badge:hover{transform:scale(1.06)}

.card-image{position:relative}

/* When in list-view ensure play badge sits correctly */
.library-grid.list-view .play-badge{left:16px;bottom:16px}

/* Ensure overlay/play buttons keep their intended colors on hover (override any broad hover rules) */
.overlay-btn, .play-badge { color: #fff; background: rgba(248,16,125,0.95); }
.overlay-btn:hover, .play-badge:hover { background: rgba(248,16,125,0.95) !important; color: #fff !important; }

/* Ensure hover on the card doesn't invert the play controls */
.product-card:hover .overlay-btn,
.product-card:hover .play-badge {
    background: rgba(248,16,125,0.95) !important;
    color: #fff !important;
}

/* Main Container */
.products-page {
    min-height: 100vh;
    background: #181a1b;
}

/* Header Section — page-header block removed; left here as no-op in case class reused elsewhere */
.page-header {
    background: transparent;
    padding: 0;
}

.product-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    /* Graceful fade-in when appended via infinite scroll */
    animation: cardFadeIn 0.35s ease both;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Skeleton shimmer while images load */
.lazy-image-wrap.is-loading {
    background: linear-gradient(90deg, #e8e8e8 25%, #f4f4f4 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

.products-grid-sentinel {
    grid-column: 1 / -1;
    min-height: 1px;
}

.products-grid-loader {
    grid-column: 1 / -1;
    display: none;
    text-align: center;
    color: #666;
    padding: 18px 0 28px;
}

.products-grid-loader.is-active {
    display: block;
}




/* Responsive Design */
@media (max-width: 968px) {
    .slide-content {
        padding: 40px;
    }
    
    .slide-title {
        font-size: 36px;
        line-height: normal;
    }
    
    .carousel-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 36px;
    }

    .slide-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px;
    }
    
    .slide-image {
        display: none;
    }
    
    .carousel-container {
        height: auto;
        min-height: 300px;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Override: Ensure primary CTA colors and backgrounds are preserved across states
   Hover: slightly lift the button. Active/press: show a pressed (sunk) appearance
   Focus: show an accessible focus ring. Keep rules highly specific and placed
   at the end so they win over bundled styles. */
.product-info .btn-primary,
.confirm-actions .btn-primary,
.btn-add-cart,
.product-actions .btn-primary {
    color: #ffffff !important; /* force white text */
    padding: 8px !important;
    background-color: #fb007b; /*transparent !important;*/
    box-shadow: 0 10px 25px rgba(248,16,125,0.18) !important;
}

/* Disabled state: force neutral light grey instead of brand pink */
.product-actions .btn-primary.btn-disabled,
.product-actions .btn-primary[aria-disabled="true"],
.product-actions .btn-primary:disabled,
.guest-buy-form #guestBuyButton.btn-disabled,
.guest-buy-form #guestBuyButton:disabled {
    background-color: #e5e7eb !important; /* bg-gray-200 */
    color: #6b7280 !important;            /* text-gray-500 */
    border-color: #d1d5db !important;     /* border-gray-300 */
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed !important;
}
.product-actions .btn-primary.btn-disabled:hover,
.product-actions .btn-primary[aria-disabled="true"]:hover,
.product-actions .btn-primary:disabled:hover,
.guest-buy-form #guestBuyButton.btn-disabled:hover,
.guest-buy-form #guestBuyButton:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Hover -> lifted */
.product-info .btn-primary:hover,
.confirm-actions .btn-primary:hover,
.product-actions .btn-primary:hover,
.btn-add-cart:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 40px rgba(248,16,125,0.22) !important;
}

/* Active (pressed) -> sink slightly to indicate press */
.product-info .btn-primary:active,
.confirm-actions .btn-primary:active,
.product-actions .btn-primary:active,
.btn-add-cart:active {
    transform: translateY(1px) !important; /* appear pressed */
    box-shadow: 0 6px 14px rgba(0,0,0,0.12) !important;
}

/* Focus -> accessible outline without altering layout */
.product-info .btn-primary:focus,
.confirm-actions .btn-primary:focus,
.product-actions .btn-primary:focus,
.btn-add-cart:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(248,16,125,0.12) !important;
}

/* Ensure active/pressed state wins against compiled/react bundle selectors
   Match Bootstrap-like compiled selectors and force our gradient + color. */
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle:active,
.confirm-actions .btn-primary:active {
    color: #ffffff !important;
    background-image: linear-gradient(135deg, #F8107D 0%, #FF6B35 100%) !important;
    background-color: transparent !important;
    border-color: transparent !important;
    transform: translateY(1px) !important; /* pressed */
    box-shadow: 0 6px 14px rgba(0,0,0,0.12) !important;
}

/* ================================================================
   PRODUCT LISTING PAGE STYLES (from ProductListing.template.php)
   Priority: These override shop.css defaults for the listing page
   ================================================================ */

/* Product Grid Layout */
.products-grid { 
    display: grid; 
    grid-gap: 12px; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
}

/* Product Card - Flexbox for vertical layout */
.product-card { 
    background: #f9f9f9; 
    border-radius: 8px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Product Image Container */
.product-image { 
    position: relative; 
    height: 220px; 
    overflow: hidden; 
    background: #fff; 
}

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

/* Image Overlay (for preview button) */
.image-overlay { 
    position: absolute; 
    inset: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: rgba(0,0,0,0.3); 
    opacity: 0; 
    transition: opacity 0.2s;
    z-index: 10;
}

.product-card:hover .image-overlay { 
    opacity: 1; 
}

.overlay-play { 
    background: rgba(255,255,255,0.95); 
    border: 0; 
    border-radius: 50%; 
    width: 50px; 
    height: 50px; 
    font-size: 20px; 
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #b30059;
}

.overlay-play:hover {
    transform: scale(1.15);
    background: rgba(255,255,255,1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Filter Section */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
}

.artist-filter-section {
    padding-top: 0;
    overflow-x: auto;
    white-space: nowrap;
}

.filter-btn {
    padding: 0px 3px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
}

.filter-btn:hover {
    background: #f5f5f5;
    border-color: #b30059;
    transform: translateY(-1px);
    text-decoration: none;
}

.filter-btn.active {
    background: #b30059;
    color: #fff;
    border-color: #b30059;
} 

/* Format Badge */
.product-format { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    background: rgba(0,0,0,0.65); 
    color: #fff; 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-size: 11px; 
    font-weight: 600; 
    text-transform: uppercase; 
    backdrop-filter: blur(4px);
    z-index: 5; 
}

/* Product Info Section */
.product-info { 
    padding: 12px; 
    display: flex; 
    flex-direction: column; 
    flex: 1; 
}

/* Product Title */
.product-title { 
    font-weight: 600; 
    margin: 8px 0 4px; 
    font-size: 14px; 
}

/* Artist/Owner Credit */
.product-artist { 
    font-size: 12px; 
    color: #666; 
    margin-bottom: 6px; 
}

.product-artist a { 
    color: #b30059; 
    text-decoration: none; 
    font-weight: 500; 
}

.product-artist a:hover { 
    text-decoration: underline; 
}

/* Product Price */
.product-price { 
    font-weight: 700; 
    color: #b30059; 
    font-size: 16px; 
    margin: 6px 0; 
}

/* CTA Button Container - pushed to bottom */
.product-cta { 
    margin-top: auto; 
}

/* Add to Cart Button */
.btn-add-cart { 
    display: block; 
    width: 100%; 
    padding: 10px; 
    color: #fff; 
    border: 0; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: 600; 
}

.btn-add-cart:hover { 
    background: #8a0042; 
}

.btn-add-cart:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

/* Variant Selector */
.product-variants { 
    margin: 8px 0; 
}

.variant-selector { 
    width: 100%; 
    padding: 8px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-size: 13px; 
    background: #fff; 
    cursor: pointer; 
}

/* Now Playing toast */
.audio-player {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 18, 24, 0.92);
    color: #fff;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1400;
}

.audio-player.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.audio-player span {
    margin: 0;
    line-height: 1;
}

.audio-player button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.audio-player button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
}

.audio-player button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* ================================================================
   CAROUSEL STYLES
   ================================================================ */

.hero-carousel { 
    margin-bottom: 24px; 
}

.carousel-container { 
    position: relative; 
    height: 360px; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    border-radius: 12px; 
    overflow: hidden; 
    margin-bottom: 24px;

}

.carousel-track { 
    display: flex; 
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
    height: 100%; 
}

.carousel-slide { 
    min-width: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 40px 100px 40px 100px; 
    position: relative; 
    transition: opacity 0.5s ease;
}

.slide-content { 
    max-width: 44%; 
    z-index: 2; 
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.slide-title { 
    font-size: 32px; 
    font-weight: 700; 
    margin-bottom: 12px; 
    line-height: initial; 
}

.slide-description { 
    font-size: 14px; 
    line-height: 1.6; 
}

.slide-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 40px;
    max-width: fit-content;
    position: relative;
}

.slide-image img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.5));
}

.lazy-image-wrap {
    position: relative;
}

.lazy-image-wrap .image-loading-indicator {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 6;
    pointer-events: none;
}

.lazy-image-wrap.is-loading .image-loading-indicator {
    display: flex;
}

.image-loading-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255, 255, 255, 0.28);
    border-top-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    animation: productImageSpin 0.8s linear infinite;
}

.image-loading-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    background: rgba(10, 18, 40, 0.42);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.slide-image.lazy-image-wrap.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.18) 20%, rgba(255,255,255,0.32) 50%, rgba(255,255,255,0.18) 80%);
    background-size: 200% 100%;
    animation: productImageShimmer 1.25s linear infinite;
    z-index: 4;
}

.slide-image.lazy-image-wrap.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(6, 12, 26, 0.1) 0%, rgba(6, 12, 26, 0.22) 100%);
    z-index: 5;
}

.slide-image.lazy-image-wrap.is-loading img {
    opacity: 0;
}

.slide-image img {
    transition: opacity 0.25s ease;
}

.lazy-image-wrap.is-loading .audio-preview-icon {
    opacity: 0 !important;
}

.slide-image .audio-preview-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 0;
}

.slide-image:hover .audio-preview-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.slide-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 24px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
}

.slide-cta:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav.prev {
    left: 20px;
}

.carousel-nav.next {
    right: 20px;
}

.carousel-nav:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
}

.carousel-indicators {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
    width: 24px;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.75);
}

/* ================================================================
   SINGLE PRODUCT PAGE STYLES (from inline styles)
   ================================================================ */

.product-page {
    --single-product-accent: #F8107D;
    --single-product-muted: #666;
    --single-product-border: #e0e0e0;
    padding: clamp(1.5rem, 3vw, 3.75rem) clamp(1rem, 3vw, 3rem) 4rem;
    margin: 0 auto 3.5rem;
    max-width: 1600px; /* Increased from 1200px for Phase 8 two-column layout */
}

.product-page .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 1.25rem;
}

.product-page .breadcrumbs a {
    color: var(--single-product-accent);
    text-decoration: none;
    font-weight: 500;
}

.product-page .breadcrumbs a:hover,
.product-page .breadcrumbs a:focus-visible {
    text-decoration: underline;
}

.product-page .breadcrumbs span {
    color: #999;
}

.image-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.thumbnail:hover {
    border-color: #ddd;
}

.thumbnail.active {
    border-color: #F8107D;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:focus-visible {
    outline: 2px solid var(--single-product-accent);
    outline-offset: 2px;
}

/* Main image container - constrain size on all viewports so it doesn't push CTAs below the fold */
.main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fefefe;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.15);
}

.main-image .variant-background {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Layout: two columns - image and info side by side */
.product-container {
    margin: 30px 0;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
}

.product-gallery {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--single-product-border);
    padding: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.07);
    position: relative;
    min-width: 0;
    overflow: hidden;
}

@media (min-width: 1200px) {
    .product-gallery {
        position: sticky;
        top: clamp(24px, 3vw, 60px);
        align-self: start;
    }
}

.product-info {
    min-width: 0; /* allow flex children to shrink properly inside grid */
    overflow: hidden;
}

/* Product Info */
.product-info h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.product-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1vw, 1.25rem);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--single-product-muted);
}

.product-meta a {
    color: var(--single-product-accent);
    text-decoration: none;
}

.product-meta a:hover {
    text-decoration: underline;
}

.product-description {
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.04);
}

.product-preview-audio {
    border: 1px solid var(--single-product-border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 30px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.product-preview-audio audio {
    width: 100%;
    border-radius: 8px;
    display: block;
}

/* Action Buttons */
.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.guest-buy-form {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guest-buy-form > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.guest-buy-form button {
    flex: 1 1 180px;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-height: 48px;
    min-width: 140px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #F8107D 0%, #FF6B35 100%);
    color: white;
    /* prevent primary CTA from stretching to fill the flex row */
    flex: 0 0 auto;
    box-shadow: 0 12px 30px rgba(248, 16, 125, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(248, 16, 125, 0.3);
}

.btn-secondary {
    /* background: #6c757d; */
    /* color: white; */
    background-color: #10f8d7;
    flex: 0 0 auto;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    /* background: #5a6268; */
    background-color: #0d9c89;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 240, 248, 0.3);
}

.btn-disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Additional Info */
.product-details {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item strong {
    color: #333;
}

/* Related Products Section */
.related-section {
    margin-bottom: 60px;
}

.related-section h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.related-card img:not(.related-card-thumb) {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-card-info {
    padding: 15px;
}

/* Inline row with small thumb inside card info */
.related-card-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.related-card-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 auto;
    background: #f5f5f5;
}

.album-page .product-main {
    align-items: start;
}

.album-gallery {
    gap: 1.5rem;
}

.album-cover-frame {
    aspect-ratio: 1 / 1;
    margin-bottom: 1.5rem;
}

.album-summary-card {
    background: linear-gradient(180deg, #fff 0%, #faf6f8 100%);
    border: 1px solid var(--single-product-border);
    border-radius: 14px;
    padding: 1.1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.05);
}

.album-summary-lead {
    margin: 0 0 1rem;
    font-size: 0.98rem;
    line-height: 1.6;
    color: #444;
}

.album-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.9rem;
}

.album-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.8rem 0.9rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
}

.album-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777;
}

.album-stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
}

.album-description {
    margin-bottom: 0;
    background: #fff;
}

.album-info-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.album-kicker {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--single-product-accent);
}

.album-tracklist-panel {
    background: #fff;
    border: 1px solid var(--single-product-border);
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.07);
}

.album-tracklist-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0.8rem;
}

.album-tracklist-head h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #222;
}

.album-tracklist-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

.album-tracklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.album-tracklist-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.album-track-number {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.album-track-number[title] {
    cursor: pointer;
}

.album-track-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.album-track-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #202020;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-track-subtitle {
    font-size: 0.83rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-track-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.album-track-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.56rem 0.82rem;
    border-radius: 999px;
    background: rgba(248, 16, 125, 0.1);
    color: var(--single-product-accent);
	border: 0;
	cursor: pointer;
    box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
    line-height: 1.1;
    min-height: 2rem;
    white-space: nowrap;
}

.album-track-link:hover,
.album-track-link:focus-visible {
    text-decoration: none;
    background: rgba(248, 16, 125, 0.18);
}

.album-track-link-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.album-track-link-secondary:hover,
.album-track-link-secondary:focus-visible {
    background: rgba(0, 0, 0, 0.12);
}

.album-tracklist-empty {
    margin: 0;
    padding: 0.35rem 0 0;
    color: #666;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .album-tracklist-item {
        grid-template-columns: auto 1fr;
    }

    .album-track-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 2.9rem;
    }

    .album-tracklist-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

.related-card-inline h3 {
    margin: 0;
    font-size: 16px;
}

.debug-mini {
    margin: 6px 0 0;
    font-size: 11px;
    color: #888;
    word-break: break-all;
}

.related-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.related-card .price {
    font-size: 20px;
    font-weight: bold;
    color: var(--single-product-accent, #F8107D);
}

.related-card .format {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

/* Owner/artist meta line inside related cards */
.related-card .owner {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.share-buttons span {
    font-weight: 600;
    margin-right: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
}

/* Share trigger (YouTube-like pill) */
.share-main {
    /* override the circular .share-btn defaults */
    width: auto !important;
    height: auto !important;
    padding: 8px 12px !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #202124 !important; /* dark neutral like YouTube */
    color: #fff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    border: 0 !important;
    font-weight: 600;
}

.share-main i, .share-main .share-fallback {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

/* keep small circular icons for overlay targets */
.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-whatsapp { background: #25d366; }
.share-email { background: #ea4335; }

.share-btn:hover {
    transform: scale(1.1);
}

.share-label {
    margin-left: 6px;
    font-size: 14px;
    color: #fff;
    display: inline-flex;
    align-items: center;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.share-btn:focus-visible,
.share-main:focus-visible {
    outline: 3px solid rgba(248, 16, 125, 0.55);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary,
    .btn-secondary,
    .thumbnail,
    .related-card,
    .share-btn {
        transition: none !important;
    }
}

/* PayPal Button Container */
#paypal-button-container {
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .main-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-image .variant-background {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }
    
    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .product-actions .btn-primary,
    .product-actions .btn-secondary,
    .guest-buy-form button {
        width: 100%;
        justify-content: center;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .product-description,
    .product-preview-audio {
        padding: 16px;
    }
}

/* ===== Inline-to-CSS refactor additions ===== */

/* No-products message (was inline in template) */
.no-products {
    text-align: center;
    padding: 40px;
}

/* Ensure preview audio is hidden via CSS (was inline) */
#previewAudio {
    display: none;
}

/* Subscription modal (moved from inline attrs) */
.subscription-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.subscription-modal.show {
    display: flex;
}
.subscription-modal__box {
    background: #fff;
    margin: 0 auto;
    padding: 30px;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}

/* Make CTA anchors consistent (replaces repeated inline text-align/text-decoration) */
.btn-add-cart,
.btn-add-cart.product-cta-link,
.product-cta a {
    text-align: center;
    text-decoration: none;
    display: inline-block;
    color: inherit;
}

/* Audio player stop button (replaces inline styling on the stop button) */
.audio-player .audio-stop-btn {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    display: grid;
    place-items: center;
}

/* Utility: hidden class used for JS toggles */
.u-hidden { display: none !important; }

/* Example: dynamic background pattern using CSS custom property (NOT applied to carousel slides here)
   Template should set: style="--bg: linear-gradient(...); --fg: #fff;"
   CSS then uses background: var(--bg); color: var(--fg); */
.dynamic-bg {
    background: var(--bg, transparent);
    color: var(--fg, inherit);
}

/* Small accessibility polish for subscription modal buttons */
.subscription-modal__box .btn-add-cart,
.subscription-modal__box .btn-primary {
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
}

.action-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.nowrap {
    white-space: nowrap;
}

/* Share Overlay */
.share-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.share-overlay__box {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.share-overlay__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.share-overlay__title {
    font-size: 16px;
}

.share-overlay__close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.share-overlay__close:hover {
    background: #f0f0f0;
}

.share-overlay__content {
    display: flex;
    gap: 14px;
    align-items: center;
}

.share-overlay__image {
    flex: 0 0 auto;
}

.share-overlay__thumb {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.share-overlay__info {
    flex: 1 1 auto;
}

.share-overlay__product-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.share-overlay__product-url {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    word-break: break-all;
}

.share-overlay__buttons {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* Horizontal Variant Pills (Image/Details Switching) */
.variant-pills-horizontal {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.variant-pills-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.variant-pill-h {
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: white;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-pill-h:hover {
    border-color: #F8107D;
    color: #F8107D;
}

.variant-pill-h.active {
    background: #F8107D;
    color: white;
    border-color: #F8107D;
}

/* Product Gallery */
.product-gallery {
    position: relative;
    width: 100%;
}

.main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background: #f5f5f5;
    margin-bottom: 12px;
}

.main-image .variant-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Audio Play Overlay on Image */
.image-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
    z-index: 10;
}

.main-image:hover .image-play-overlay {
    opacity: 1;
}

.play-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #F8107D;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(248, 16, 125, 0.3);
}

.play-button i {
    color: #F8107D !important;
    margin-left: 3px;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(248, 16, 125, 0.4);
}

/* Image Thumbnails */
.image-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail:hover {
    border-color: #d1d5db;
}

.thumbnail.active {
    border-color: #F8107D;
}

/* CTA Button Row (Buy Now | Add to Library | Add to Basket) */
.product-cta-row {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.product-cta-row .btn-primary,
.product-cta-row .btn-secondary {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-cta-row .btn-primary {
    background: #F8107D;
    color: white;
}

.product-cta-row .btn-primary:hover {
    background: #e60a6f;
}

.product-cta-row .btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.product-cta-row .btn-secondary:hover {
    background: #d1d5db;
}

/* Right Basket Drawer - hidden by default, slides in from right */
.basket-drawer {
    display: none;
    position: fixed;
    right: 0;
    top: 0;
    width: 340px;
    height: 100vh;
    background: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
    padding: 20px;
    overflow-y: auto;
    z-index: 99999;
    transition: none;
}

.basket-drawer.open {
    display: flex;
    flex-direction: column;
}

.basket-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 99998;
}

.basket-backdrop.open {
    display: block;
}

.basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.basket-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.basket-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.basket-close:hover {
    color: #111;
}

.basket-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.basket-variants {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.basket-empty {
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    padding: 24px 0;
    font-style: italic;
}

.basket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    gap: 10px;
}

.basket-item-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.basket-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.basket-item-label {
    color: #374151;
    line-height: 1.3;
    font-size: 13px;
}

.basket-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.qty-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.qty-btn:hover {
    background: #F8107D;
    border-color: #F8107D;
    color: white;
}

.qty-value {
    min-width: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.basket-item-price {
    font-weight: 600;
    color: #F8107D;
    font-size: 14px;
}

.basket-item-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    font-size: 16px;
}

.basket-item-remove:hover {
    color: #F8107D;
}

.basket-summary {
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.basket-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 16px;
    color: #111;
}

.basket-total-price {
    color: #F8107D;
}

.basket-checkout {
    background: #F8107D;
    color: white;
    border: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 11px 16px 13px;
    font-weight: 600;
    line-height: 1.15;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.basket-checkout:hover {
    background: #e60a6f;
}

.basket-footer-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.basket-footer-actions .button {
    flex: 1;
    justify-content: center;
    text-align: center;
}

/* Basket Badge in Nav */
.nav-basket-button {
    position: relative;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.nav-basket-button:hover {
    border-color: #F8107D;
    color: #F8107D;
}

.nav-basket-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #F8107D;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Product Details Table */
.product-details {
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 16px;
    margin: 16px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: #374151;
    font-weight: 600;
}

.detail-item span {
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product-container {
        grid-template-columns: 1fr 280px;
        gap: 30px;
    }
    
    .product-main {
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    .product-container {
        grid-template-columns: 1fr 260px;
        gap: 25px;
    }
    
    .product-main {
        gap: 25px;
    }
    
    .basket-drawer {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        max-height: 100vh;
        border-radius: 0;
        border: none;
        z-index: 1000;
        box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    }
    
    .basket-drawer.hidden {
        display: none;
    }
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
    }
    
    .product-main {
        gap: 20px;
    }
    
    .basket-drawer {
        position: static;
        max-height: none;
        margin-top: 20px;
        width: 100%;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
    }
    
    .product-cta-row {
        flex-direction: column;
    }
    
    .product-cta-row .btn-primary,
    .product-cta-row .btn-secondary {
        flex: unset;
        width: 100%;
    }
    
    .variant-pills-horizontal {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    body .product-main {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    body .product-gallery,
    body .product-info {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px;
    }
    
    .product-container {
        padding: 12px;
    }
}

/* ===== FORCE: Ensure product-main always uses 2 columns on desktop ===== */
@media (min-width: 769px) {
    /* high-specificity rule to override any compiled/minified bundle selectors */
    body .product-main {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
        width: 100% !important;
    }
    /* make sure info column behaves like the gallery column */
    body .product-gallery.product-info {
        width: 100%;
        max-width: 100%;
        align-self: start !important;
    }
}

/* Audio Toast Player */
#audioToastPlayer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 9999 !important;
    min-width: 320px;
    max-width: 450px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.toast-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #111;
    width: 100%;
    text-align: center;
    margin-bottom: 4px;
}

#audioToastPlayer audio {
    width: 100% !important;
    height: 36px !important;
    flex: 1 1 auto;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #111;
}

/* ===== AUDIO TOAST PLAYER (New) ===== */
.audio-toast {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 16px 20px;
    z-index: 99999;
    min-width: 320px;
    max-width: 450px;
    transition: bottom 0.3s ease;
}

.audio-toast.show {
    bottom: 24px;
}

.audio-toast-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-countdown {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    min-width: 45px;
    text-align: center;
    flex-shrink: 0;
}

.audio-play-pause,
.audio-stop {
    background: #3b82f6;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.audio-play-pause i,
.audio-stop {
    color: white !important;
}

.audio-play-pause:hover,
.audio-stop:hover {
    background: #2563eb;
}

.audio-stop {
    background: #ef4444;
    font-size: 18px;
    font-weight: bold;
}

.audio-stop:hover {
    background: #dc2626;
}

.audio-progress {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.audio-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    width: 100%;
    transition: width 0.05s linear;
}

.audio-disclaimer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.audio-disclaimer i {
    font-size: 10px;
}

/* ===== RELATED PRODUCTS SECTIONS ===== */
.related-section {
    margin-top: 48px;
    padding: 24px 0;
}

.related-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin: 0 0 24px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 20px;
    }
}

.related-section .products-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1100px) {
    .related-section .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
        gap: 18px;
    }
}

.product-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.products-grid-sentinel {
    grid-column: 1 / -1;
    min-height: 1px;
}

.products-grid-loader {
    grid-column: 1 / -1;
    display: none;
    text-align: center;
    color: #666;
    padding: 18px 0 28px;
}

.products-grid-loader.is-active {
    display: block;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-card .product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f3f4f6;
}

.product-card .product-image.lazy-image-wrap.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f3f4f6 20%, #e5e7eb 50%, #f3f4f6 80%);
    background-size: 200% 100%;
    animation: productImageShimmer 1.25s linear infinite;
    z-index: 4;
}

.product-card .product-image.lazy-image-wrap.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    margin-left: -9px;
    border: 2px solid rgba(179, 0, 89, 0.2);
    border-top-color: rgba(179, 0, 89, 0.7);
    border-radius: 50%;
    animation: productImageSpin 0.9s linear infinite;
    z-index: 5;
}

.product-card .product-image.lazy-image-wrap.is-loading .product-img,
.product-card .product-image.lazy-image-wrap.is-loading .artwork-overlay,
.product-card .product-image.lazy-image-wrap.is-loading .primary-image-overlay {
    opacity: 0;
}

.product-card .product-image .product-img,
.product-card .product-image .artwork-overlay,
.product-card .product-image .primary-image-overlay {
    transition: opacity 0.25s ease;
}

@keyframes productImageShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes productImageSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Product Card Mockup Overlays */
.product-card .variant-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.product-card .artwork-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    object-fit: cover;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.product-card .cassette-text-overlay {
    position: absolute;
    top: 33%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-2deg);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 3;
    pointer-events: none;
    width: 90%;
    padding: 10px;
}

.product-card .cassette-title {
    font-family: 'Permanent Marker', cursive;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
    margin-bottom: 4px;
}

.product-card .cassette-artist {
    font-family: 'Permanent Marker', cursive;
    font-size: 10px;
    color: #000;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
}

/* Dynamic text colors for cassette overlay based on product color */
.product-card .cassette-text-overlay.text-light .cassette-title,
.product-card .cassette-text-overlay.text-light .cassette-artist {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.product-card .cassette-text-overlay.text-dark .cassette-title,
.product-card .cassette-text-overlay.text-dark .cassette-artist {
    color: #000;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
}

.product-card .product-format {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.product-card .product-info {
    padding: 12px;
}

.product-card .product-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .product-artist {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.product-card .product-artist a {
    color: var(--single-product-accent, #F8107D);
    text-decoration: none;
}

.product-card .product-artist a:hover {
    text-decoration: underline;
}

.product-card .product-price {
    font-size: 14px;
    font-weight: 700;
    color: #059669;
}

.related-section .product-card .product-image {
    aspect-ratio: 1 / 1;
}

.related-section .product-card .product-info {
    padding: 10px;
}

.related-section .product-card .product-title {
    font-size: 13px;
    margin: 0 0 4px 0;
}

.related-section .product-card .product-artist {
    font-size: 11px;
    margin-bottom: 6px;
}

.related-section .product-card .product-price {
    font-size: 13px;
}

.related-section .product-card .product-format {
    top: 6px;
    right: 6px;
    padding: 3px 7px;
    font-size: 10px;
}

/* Basket nav button styles */
.basket-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #374151;
}
.basket-nav-btn .fa-shopping-cart {
    font-size: 18px;
    color: #F8107D;
}
.basket-badge {
    position: absolute;
    top: -6px;
    right: -18px;
    background: #F8107D;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 10px;
    padding: 2px 6px;
    min-width: 24px;
    text-align: center;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(248,16,125,0.15);
}


/* Product Details Table */
.product-details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.product-details-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f5f5f5;
    font-weight: 600;
    width: 30%;
    border-bottom: 1px solid #e0e0e0;
}

.product-details-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.product-details-table tr:last-child th,
.product-details-table tr:last-child td {
    border-bottom: none;
}

.color-dropdown {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.color-dropdown:focus {
    outline: none;
    border-color: #0b3b66;
    box-shadow: 0 0 0 2px rgba(11, 59, 102, 0.1);
}

/* Image Loading Overlay */
.image-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 4;
}

.image-loading-overlay span {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    letter-spacing: 0.5px;
}

/* Basket Product Info Section */
.basket-product-info {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
}

.basket-product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.basket-product-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
}

/* Product Mockup - Layered Image Effect */
.artwork-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    object-fit: cover;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

/* Primary Image Overlay - Full size for cassette cutout effect */
.primary-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    z-index: 2;
    pointer-events: none;
    -webkit-mask-image: url('/attachments/assets/formats/mask_cassette.png');
    mask-image: url('/attachments/assets/formats/mask_cassette.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Cassette Mask Overlay - Creates cutout effect */
.cassette-mask-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 3;
    pointer-events: none;
    display: none !important; /* Hide this - using CSS mask on primary-image-overlay instead */
}

/* Mockup Disclaimer Text */
.mockup-disclaimer {
    margin: 8px 0 16px 0;
    text-align: center;
    color: gray;
    line-height: 1.4;
}

/* Cassette Text Overlay */
.cassette-text-overlay {
    position: absolute;
    top:38%;
    left: 49%;
    transform: translate(-50%, -50%) rotate(-2deg);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 4;
    pointer-events: none;
    width: 100%;
    padding: 20px;
}

.cassette-title {
    font-family: 'Permanent Marker', cursive;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.cassette-artist {
    font-family: 'Permanent Marker', cursive;
    font-size: 16px;
    color: #000;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
}

/* Dynamic text colors for cassette overlay based on product color */
.cassette-text-overlay.text-light .cassette-title,
.cassette-text-overlay.text-light .cassette-artist {
    color: #fff;
    text-shadow: 2px 2px 3px rgba(0,0,0,0.9);
}

.cassette-text-overlay.text-dark .cassette-title,
.cassette-text-overlay.text-dark .cassette-artist {
    color: #000;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.8);
}

@media (max-width: 768px) {
    .cassette-title {
        font-size: 18px;
    }
    .cassette-artist {
        font-size: 14px;
    }
}

/* ================================================================
   CHECKOUT PAGE STYLES
   ================================================================ */

/* Primary checkout button - matches site-wide gradient */
.checkout-page .btn-primary {
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    background: linear-gradient(135deg, #F8107D 0%, #FF6B35 100%);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    transition: transform 0.08s ease, opacity 0.08s ease;
}

.checkout-page .btn-primary:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.checkout-page .btn-primary:active {
    transform: translateY(0);
}

/* Three-column checkout layout */
.checkout-container {
    max-width: 980px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 220px 1fr 260px;
    gap: 18px;
    align-items: start;
}

/* Product image */
.checkout-image {
    width: 220px;
    height: 220px;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Main content column */
.checkout-main {
    min-width: 0;
}

.checkout-main h1 {
    margin-top: 0;
}

/* Selected items box */
.checkout-items {
    margin: 20px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.checkout-items-header {
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 15px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
}

.checkout-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.checkout-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.checkout-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkout-item-price {
    font-weight: 600;
    color: #F8107D;
}

/* Checkout quantity controls */
.checkout-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-item-qty-static {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.basket-item-qty-static {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    margin: 4px 0;
}

.checkout-item-qty .qty-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-item-qty .qty-btn:hover {
    background: #F8107D;
    border-color: #F8107D;
    color: white;
}

.checkout-item-qty .qty-input {
    width: 50px;
    height: 28px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    padding: 0 4px;
}

.checkout-item-qty .qty-input:focus {
    outline: none;
    border-color: #F8107D;
}

/* Remove spinner buttons from number input */
.checkout-item-qty .qty-input::-webkit-inner-spin-button,
.checkout-item-qty .qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.checkout-item-qty .qty-input {
    -moz-appearance: textfield;
}

.checkout-item-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

/* .checkout-item-actions button,
.checkout-item-actions a {
    flex: 1;
    border-radius: 8px;
    border: 1px solid #111;
    background: transparent;
    color: #111;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
} */

/* Total section */
.checkout-total {
    margin: 20px 0;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #F8107D;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
}

.checkout-total-price {
    color: #F8107D;
}

/* Demo message */
.checkout-demo-message {
    color: #666;
    margin-top: 6px;
    font-size: 13px;
}

/* Right column upsell */
.checkout-upsell {
    padding: 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #f4f1ee;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
}

.checkout-upsell-header {
    font-weight: 700;
    margin-bottom: 6px;
    color: #222;
    font-size: 14px;
}

.checkout-upsell-description {
    color: #444;
    margin-bottom: 8px;
    font-size: 13px;
}

.checkout-upsell form {
    margin-top: 8px;
}

/* .checkout-upsell button,
.checkout-subscription-box button {
    width: 100%;
}

.checkout-subscription-box .button {
    background: #10f8d7;
    color: #000;
} */

.checkout-upsell-divider {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Subscription offer in upsell column */
.checkout-subscription-box {
    padding: 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #f4f1ee;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
}

.checkout-subscription-box ul {
    margin: 6px 0 10px 18px;
    color: #444;
    font-size: 13px;
}

.checkout-subscription-box ul li {
    margin-bottom: 4px;
}

.checkout-subscription-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.checkout-subscription-actions a {
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
}

.checkout-subscription-actions a:first-child {
    background: #28a745;
    color: #fff;
}

.checkout-subscription-actions a:last-child {
    padding: 8px 12px;
    border: 1px solid #eee;
    background: linear-gradient(135deg, #ffffff 0%, #fbf7f5 100%);
    color: #111;
}

/* Subscribed user - saving message */
.checkout-subscribed {
    padding: 16px;
    border-radius: 8px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.checkout-subscribed-header {
    font-weight: 700;
    margin-bottom: 8px;
    color: #FF6B35;
    font-size: 16px;
}

.checkout-subscribed a {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    background: #11fbda;
    color: #000;
    text-decoration: none;
    font-weight: 700;
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 968px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .checkout-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .checkout-item-actions {
        flex-direction: column;
    }
    
    .checkout-subscription-actions {
        flex-direction: column;
    }
    
    .checkout-subscription-actions a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .checkout-image {
        width: 100%;
        max-width: 100%;
    }
    
    .checkout-main,
    .checkout-upsell {
        width: 100%;
    }
    
    .checkout-items-header {
        font-size: 14px;
    }
    
    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .checkout-item img {
        width: 60px;
        height: 60px;
    }
    
    .checkout-item-price {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .checkout-total {
        font-size: 14px;
    }
    
    .checkout-upsell-header {
        font-size: 14px;
    }
    
    .checkout-upsell-description {
        font-size: 13px;
    }
}

/* Member group badges (profile summary) */
.mg-divider { margin: 14px 0 10px; border: none; border-top: 1px solid rgba(128,128,128,0.2); }
.mg-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 4px; }
.mg-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid currentColor;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #888;
    border-color: #888;
    white-space: nowrap;
    transition: opacity .15s;
}
.mg-badge i { font-size: 11px; }
