/* =========================================
   PRODUCTO DETALLE — Responsive Layout
   Rastro Ripollet

   Breakpoints:
     Desktop  ≥ 900px  (sidebar nav on right)
     Tablet   600–899px
     Mobile   < 600px
   ========================================= */

/* --- Loading & Error States --- */
.product-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--text-main);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.product-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 12px;
    text-align: center;
    padding: 40px 20px;
}

.product-error .error-icon {
    color: var(--text-muted);
    opacity: 0.5;
}

.product-error h2 {
    font-size: 20px;
    font-weight: 600;
}

.product-error p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 360px;
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0 16px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color 0.2s;
    font-weight: 500;
    flex-shrink: 0;
}

@media (hover: hover) {
    .breadcrumb a:hover {
        color: var(--text-main);
    }
}

.breadcrumb-sep {
    opacity: 0.3;
    font-size: 10px;
    flex-shrink: 0;
}

.breadcrumb-current {
    color: var(--text-main);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* =========================================
   MAIN LAYOUT
   body already has padding-right for the
   nav on desktop (base.css), so we only
   center and constrain our content.
   ========================================= */
.product-page {
    width: 100%;
    padding: 0 24px 40px;
    /* Reduced bottom padding, handled by centering */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

/* Vertical centering on desktop */
@media (min-width: 900px) and (orientation: landscape) {
    body.page-product {
        height: 100vh;
        overflow: hidden;
    }

    .page-product app-footer {
        display: none;
    }

    .product-page {
        height: 100vh;
        overflow: hidden;
        padding: 20px 24px 32px;
        justify-content: flex-start;
    }

    .product-container {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .breadcrumb {
        padding-top: 12px;
        padding-bottom: 10px;
    }
}

.product-container {
    width: 100%;
    max-width: 1100px;
    /* Slightly wider for modern desktops */
    margin: 0 auto;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    /* Centered 1-column by default */
    gap: 32px;
    align-items: start;
}

/* 2-column only on landscape/desktop */
@media (min-width: 900px) and (orientation: landscape) {
    .product-layout {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 60px;
        flex: 1;
        min-height: 0;
        align-items: stretch;
    }

    .product-gallery {
        position: static;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 100%;
        padding-top: 20px;
        padding-bottom: 32px;
        box-sizing: border-box;
    }
    
    .gallery-main {
        max-height: calc(100vh - 260px);
    }

    .product-info {
        height: 100%;
        overflow-y: auto;
        padding-right: 16px;
    }

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

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

    .product-info::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
    }

    .product-info::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* =========================================
   GALLERY
   ========================================= */
.product-gallery {
    position: sticky;
    top: 32px;
}

.gallery-main {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    aspect-ratio: 1 / 1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    max-height: 75vh;
    /* Prevention for vertical monitors */
    user-select: none;
    -webkit-user-select: none;
    /* Removed touch-action: pan-y to allow zooming for accessibility */
}

.gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    /* Faster, more responsive curve */
    will-change: transform;
}

.gallery-track.dragging {
    transition: none !important;
}

.gallery-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.3s ease;
    will-change: transform;
}

/* Grayscale para productos vendidos */
.gallery-is-sold .gallery-item img,
#lightbox.gallery-is-sold #lightbox-img {
    filter: grayscale(75%) opacity(0.85);
}

@media (min-width: 900px) {
    .gallery-main {
        cursor: zoom-in;
    }
}

/* Pagination Dots */
.gallery-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
    padding: 30px 12px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.25) 0%, transparent 100%);
    border-radius: 0 0 20px 20px;
    /* Match gallery-main border-radius */
}

.gallery-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    pointer-events: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-dot.active {
    background: #fff;
    transform: scale(1.1);
    width: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* =========================================
   PRODUCT INFO
   ========================================= */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.product-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: -0.3px;
    text-transform: uppercase;
}

/* Actions container */
.product-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

/* Base style for action buttons (fav & share) */
.fav-btn-detail,
.share-btn-detail {
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
    will-change: transform;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    color: var(--text-muted);
    position: relative;
}

@media (hover: hover) {

    .fav-btn-detail:hover,
    .share-btn-detail:hover {
        color: var(--text-main);
        background: transparent;
        transform: scale(1.1) translateZ(0);
        /* translateZ(0) for sharpness */
    }

    .fav-btn-detail:hover {
        color: #ff4d4d;
        transform: scale(1.15) translateZ(0);
    }

    .fav-btn-detail:hover svg {
        fill: #ff4d4d;
        stroke: #ff4d4d;
    }
}

.fav-btn-detail.active {
    color: #ff4d4d;
}

.fav-btn-detail.active svg {
    fill: #ff4d4d;
    stroke: #ff4d4d;
}

/* Animación de Corazón Roto (PRO) */
.fav-btn-detail.broken {
    pointer-events: none;
}

.fav-btn-detail.broken svg {
    visibility: hidden;
}

.fav-btn-detail.broken::before,
.fav-btn-detail.broken::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    margin-left: -12px;
    background-color: #ff4d4d;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    z-index: 2;
}

.fav-btn-detail.broken::before {
    -webkit-clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    animation: heartBreakLeft 0.8s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

.fav-btn-detail.broken::after {
    -webkit-clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    animation: heartBreakRight 0.8s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

@keyframes heartBreakLeft {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }

    20% {
        transform: translate(-2px, 0) rotate(-5deg);
    }

    100% {
        transform: translate(-20px, 40px) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes heartBreakRight {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }

    20% {
        transform: translate(2px, 0) rotate(5deg);
    }

    100% {
        transform: translate(20px, 40px) rotate(45deg);
        opacity: 0;
    }
}

/* Share Tooltip */
.share-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--text-main);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-main);
}

.share-btn-detail.copied .share-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.share-btn-detail.copied {
    border-color: #25D366;
    color: #25D366;
    background: #f0fff4;
}

/* Price */
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
}

.product-sale-price {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.6;
}

/* Short description */
.product-short-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    border-left: 3px solid var(--accent-solid);
    padding-left: 16px;
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Attributes Card */
.product-attributes-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-attributes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.attr-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attr-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    opacity: 0.7;
}

.attr-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

/* Meta: Categories & Tags (2-Column Layout) */
.product-meta {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
}

.meta-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
}

.meta-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    opacity: 0.8;
}

.meta-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.meta-tag {
    display: inline-block;
    background: #f0f0f0;
    color: var(--text-main);
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
}

@media (hover: hover) {
    .meta-tag:hover {
        background: #e4e4e4;
    }
}

.product-description {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.product-description h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8a8a8a;
}

.product-description #description-content {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.75;
    white-space: pre-line;
}


/* Read More / Less Toggle */
.description-wrapper {
    position: relative;
    max-height: 160px;
    /* Umbral para móviles - Reducido para ocultar más texto */
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 900px) {
    .description-wrapper {
        max-height: 240px;
        /* Umbral para escritorio - Reducido para ocultar más texto */
    }
}

.description-wrapper.is-expanded {
    max-height: none;
    /* Expandir completamente */
}

.description-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top,
            #fff 0%,
            #fff 15%,
            rgba(255, 255, 255, 0.9) 40%,
            transparent 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 1;
    z-index: 15;
}

.description-wrapper.is-expanded .description-fade {
    opacity: 0;
}

.read-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: -0.2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: 100%;
}

.read-more-btn:hover {
    color: #000;
    transform: translateX(-50%) translateY(-2px);
}

.read-more-btn svg {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.8;
}

.is-expanded .read-more-btn {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 10px;
}

.is-expanded .read-more-btn:hover {
    transform: translateY(-2px);
}

.is-expanded .read-more-btn svg {
    transform: rotate(180deg);
}


.product-description #description-content strong,
.product-description #description-content b {
    color: var(--text-main);
    font-weight: 700;
}

.product-description #description-content ul,
.product-description #description-content ol {
    margin: 12px 0;
    padding-left: 20px;
}

.product-description #description-content li {
    margin-bottom: 6px;
}

/* WhatsApp CTA */
.wa-cta-container {
    margin-top: 24px;
}

.wa-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.2);
}

@media (hover: hover) {
    .wa-cta-btn:hover {
        background: #1fba58;
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(37, 211, 102, 0.3);
    }
}


/* =========================================
   RESPONSIVE — TABLET (600–899px)
   ========================================= */
@media (max-width: 899px),
(orientation: portrait) {
    .product-page {
        padding: 0 20px 40px;
    }

    .product-container {
        max-width: 600px;
        /* Centered content in portrait desktop */
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-gallery {
        position: static;
    }

    .gallery-nav {
        opacity: 1;
    }

    .product-title {
        font-size: 22px;
    }

    .product-price {
        font-size: 20px;
    }
}

/* =========================================
   RESPONSIVE — SMALL TABLET / LANDSCAPE PHONE
   ========================================= */
@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-container {
        max-width: 560px;
    }

    .gallery-main {
        aspect-ratio: 1 / 1;
        border-radius: 14px;
    }

    .gallery-thumb {
        width: 56px;
        height: 56px;
    }

    .product-info {
        gap: 20px;
    }
}

/* =========================================
   RESPONSIVE — MOBILE (< 600px)
   ========================================= */
@media (max-width: 599px) {
    .product-page {
        padding: 0 16px 40px;
    }

    .product-container {
        max-width: 100%;
    }

    .breadcrumb {
        padding: 14px 0 10px;
        font-size: 10px;
    }

    .breadcrumb-current {
        max-width: none;
    }

    .product-title {
        font-size: 20px;
    }

    .product-price {
        font-size: 18px;
    }

    .product-short-desc {
        font-size: 14px;
        line-height: 1.5;
    }

    .product-attributes {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .gallery-main {
        aspect-ratio: 1 / 1;
        border-radius: 12px;
    }

    .gallery-nav {
        opacity: 1;
        width: 36px;
        height: 36px;
    }

    .gallery-prev {
        left: 8px;
    }

    .gallery-next {
        right: 8px;
    }

    .gallery-thumb {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }

    .fav-btn-detail {
        width: 40px;
        height: 40px;
    }

    .fav-btn-detail svg {
        width: 20px;
        height: 20px;
    }

    .product-description {
        order: 2;
    }

    .wa-cta-btn {
        order: 1;
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 12px;
    }

    .back-to-catalog {
        order: 3;
    }

    .product-attributes-card {
        padding: 12px;
        border-radius: 12px;
    }

    .attr-value {
        font-size: 13px;
    }

    .meta-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .meta-label {
        min-width: auto;
        font-size: 10px;
        margin-bottom: 2px;
    }

    .meta-tag {
        font-size: 11px;
        padding: 4px 12px;
    }
}

/* =========================================
   LIGHTBOX (GALLERY FULL SCREEN) - DETAIL ONLY
   ========================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 100000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0 auto;
}

.lightbox-inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
    display: block;
}

.lightbox-img.dragging {
    transition: none !important;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 100002;
    transition: all 0.25s ease;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

@media (hover: hover) {
    .lightbox-close:hover {
        transform: rotate(90deg) scale(1.15);
        opacity: 0.8;
    }
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 100005;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

@media (hover: hover) {
    .lightbox-nav:hover {
        transform: translateY(-50%) scale(1.15);
        opacity: 0.8;
    }
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Eliminada restricción de 1400px que ocultaba flechas */

.lightbox-pagination {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 100006;
    pointer-events: none;
}

.lightbox-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    pointer-events: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.lightbox-dot.active {
    background: #fff;
    transform: scale(1.25);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

@media (max-width: 600px) {
    .lightbox-content {
        padding: 10px;
    }

    .lightbox-img {
        max-width: 100vw;
        max-height: 85vh;
        border-radius: 0;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .lightbox-pagination {
        bottom: 20px;
    }
}

/* --- Particles (Heart Burst) --- */
.heart-particle {
    position: absolute;
    pointer-events: none;
    color: #ff4d4d;
    z-index: 100;
    animation: heartBurst 0.8s ease-out forwards;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes heartBurst {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
    }

    15% {
        opacity: 1;
        transform: translate(0, 0) scale(1.2);
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.5);
        opacity: 0;
    }
}

/* =========================================
   MOBILE STICKY CTA REFACTOR
   ========================================= */
@media (max-width: 899px) {

    /* Hide global navbar on this page */
    .app-nav {
        display: none !important;
    }

    .wa-cta-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        z-index: 1000;
        animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .wa-cta-btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 14px 20px !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3) !important;
    }

    .wa-cta-btn:active {
        transform: scale(0.97);
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }
}

/* =========================================
   DARK THEME — DETAIL PAGE GLASS SURFACES
   ========================================= */
[data-theme="dark"] .loading-spinner {
    border-color: rgba(255, 255, 255, 0.12);
    border-top-color: var(--text-main);
}

[data-theme="dark"] .product-info::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .gallery-main,
[data-theme="dark"] .product-attributes-card,
[data-theme="dark"] .product-meta,
[data-theme="dark"] .product-description {
    background: rgba(20, 20, 20, 0.76) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
}

[data-theme="dark"] .gallery-main {
    background: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .product-short-desc {
    border-left-color: rgba(228, 200, 196, 0.42);
    color: var(--text-muted);
}

[data-theme="dark"] .attr-label,
[data-theme="dark"] .meta-label,
[data-theme="dark"] .product-description h3 {
    color: var(--text-muted) !important;
    opacity: 0.9;
}

[data-theme="dark"] .attr-value,
[data-theme="dark"] .breadcrumb-current,
[data-theme="dark"] .product-description #description-content strong,
[data-theme="dark"] .product-description #description-content b {
    color: var(--text-main) !important;
}

[data-theme="dark"] .product-description #description-content,
[data-theme="dark"] .product-error p {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .meta-tag {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .meta-tag:hover {
    background: rgba(255, 255, 255, 0.13) !important;
}

[data-theme="dark"] .description-fade {
    background: linear-gradient(to top,
            rgba(20, 20, 20, 1) 0%,
            rgba(20, 20, 20, 0.94) 18%,
            rgba(20, 20, 20, 0.72) 48%,
            transparent 100%) !important;
}

[data-theme="dark"] .read-more-btn {
    color: var(--text-main) !important;
}

[data-theme="dark"] .read-more-btn:hover {
    color: #ffffff !important;
}

[data-theme="dark"] .share-tooltip {
    background: var(--text-main);
    color: var(--bg-body);
}

[data-theme="dark"] .share-tooltip::after {
    border-top-color: var(--text-main);
}

[data-theme="dark"] .share-btn-detail.copied {
    background: rgba(37, 211, 102, 0.14);
}

@media (max-width: 899px) {
    [data-theme="dark"] .wa-cta-container {
        background: rgba(20, 20, 20, 0.86) !important;
        border-top-color: rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.38);
    }
}