/**
 * FBW Product Shortcode Styles
 * Mobile-first responsive design with modern aesthetic
 */

/* ═══════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-product {
    --fbw-primary: var(--p, #F7BE19);
    --fbw-accent: var(--a, #1A1A2E);
    --fbw-text: var(--white, #ffffff);
    --fbw-text-muted: rgba(255, 255, 255, 0.65);
    --fbw-surface: var(--ct, #1A1A2E);
    --fbw-surface-elevated: rgba(255, 255, 255, 0.06);
    --fbw-border: rgba(255, 255, 255, 0.12);
    --fbw-border-hover: rgba(247, 190, 25, 0.5);
    --fbw-radius-sm: 10px;
    --fbw-radius-md: 14px;
    --fbw-radius-lg: 20px;
    --fbw-radius-xl: 28px;
    --fbw-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --fbw-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
    --fbw-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.25);
    --fbw-shadow-glow: 0 0 40px rgba(247, 190, 25, 0.15);
    --fbw-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --fbw-transition-smooth: 280ms cubic-bezier(0.4, 0, 0.2, 1);
    --fbw-transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE LAYOUT - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    position: relative;
}

/* Stacked layout on mobile */
.fbw-product__gallery,
.fbw-product__info {
    display: block;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GALLERY - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-gallery {
    position: relative;
    width: 100%;
}

.fbw-gallery__main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--fbw-radius-lg);
    overflow: hidden;
    background: linear-gradient(145deg, #1a1a2e 0%, #12121f 100%);
    border: 2px solid var(--fbw-border);
    cursor: zoom-in;
    transition: all var(--fbw-transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fbw-gallery__main:hover {
    border-color: var(--fbw-primary);
    box-shadow: var(--fbw-shadow-glow);
}

.fbw-gallery__main:focus {
    outline: none;
    border-color: var(--fbw-primary);
    box-shadow: 0 0 0 3px rgba(247, 190, 25, 0.25);
}

.fbw-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform var(--fbw-transition-smooth);
}

.fbw-gallery__main:hover img {
    transform: scale(1.03);
}

.fbw-gallery__zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--fbw-transition-smooth);
}

.fbw-gallery__main:hover .fbw-gallery__zoom {
    opacity: 1;
    transform: scale(1);
}

/* Thumbnails */
.fbw-gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 4px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fbw-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.fbw-gallery__thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--fbw-radius-sm);
    overflow: hidden;
    border: 2px solid var(--fbw-border);
    background: #1a1a2e;
    cursor: pointer;
    padding: 0;
    transition: all var(--fbw-transition-smooth);
}

.fbw-gallery__thumb:hover {
    border-color: var(--fbw-primary);
    transform: translateY(-2px);
}

.fbw-gallery__thumb:focus {
    outline: none;
    border-color: var(--fbw-primary);
    box-shadow: 0 0 0 3px rgba(247, 190, 25, 0.25);
}

.fbw-gallery__thumb--active,
.fbw-gallery__thumb.fbw-gallery__thumb--active {
    border-color: var(--fbw-primary);
    box-shadow: 0 4px 16px rgba(247, 190, 25, 0.3);
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT INFO - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-product__info {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.fbw-product__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fbw-product__title {
    font-family: var(--font-d), 'Luckiest Guy', cursive;
    font-size: clamp(32px, 7vw, 48px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--fbw-text);
    margin: 0;
}

.fbw-product__desc {
    font-family: var(--font-b), 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--fbw-text-muted);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRICING - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-product__pricing {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fbw-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 100px;
    padding: 16px 20px;
    background: linear-gradient(145deg, rgba(247, 190, 25, 0.15) 0%, rgba(247, 190, 25, 0.05) 100%);
    border: 2px solid var(--fbw-primary);
    border-radius: var(--fbw-radius-md);
    text-align: center;
    transition: all var(--fbw-transition-smooth);
}

.fbw-price:hover {
    transform: translateY(-2px);
    box-shadow: var(--fbw-shadow-glow);
}

.fbw-price__amount {
    font-family: var(--font-d), 'Luckiest Guy', cursive;
    font-size: clamp(28px, 6vw, 36px);
    line-height: 1;
    color: var(--fbw-primary);
}

.fbw-price__label {
    font-family: var(--font-b), 'Open Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fbw-text-muted);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEPOSIT BANNER - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-deposit {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--fbw-primary) 0%, #e6ad08 100%);
    border-radius: var(--fbw-radius-md);
    box-shadow: var(--fbw-shadow-md);
}

.fbw-deposit__icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.fbw-deposit__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fbw-deposit__amount {
    font-family: var(--font-d), 'Luckiest Guy', cursive;
    font-size: 22px;
    color: var(--fbw-accent);
    line-height: 1.1;
}

.fbw-deposit__note {
    font-family: var(--font-b), 'Open Sans', sans-serif;
    font-size: 12px;
    color: rgba(26, 26, 46, 0.75);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPECS GRID - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-specs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.fbw-specs__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--fbw-surface);
    border: 1px solid var(--fbw-border);
    border-radius: var(--fbw-radius-sm);
    transition: all var(--fbw-transition-fast);
}

.fbw-specs__item:hover {
    border-color: var(--fbw-border-hover);
    transform: translateY(-1px);
}

/* Full-width items */
.fbw-specs__item:nth-child(odd:last-child) {
    grid-column: span 2;
}

.fbw-specs__icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.fbw-specs__content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.fbw-specs__label {
    font-family: var(--font-b), 'Open Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fbw-text-muted);
}

.fbw-specs__value {
    font-family: var(--font-s), 'Rowdies', cursive;
    font-size: 14px;
    font-weight: 400;
    color: var(--fbw-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Power & Water special styling */
.fbw-specs__item--power {
    border-color: rgba(58, 173, 224, 0.4);
    background: linear-gradient(135deg, rgba(58, 173, 224, 0.12) 0%, rgba(58, 173, 224, 0.04) 100%);
}

.fbw-specs__item--power .fbw-specs__value {
    color: #3AADE0;
}

.fbw-specs__item--water {
    border-color: rgba(97, 206, 112, 0.4);
    background: linear-gradient(135deg, rgba(97, 206, 112, 0.12) 0%, rgba(97, 206, 112, 0.04) 100%);
}

.fbw-specs__item--water .fbw-specs__value {
    color: #61CE70;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CTA BUTTON - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-product__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.fbw-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--fbw-primary) 0%, #e6ad08 100%);
    border: none;
    border-radius: var(--fbw-radius-lg);
    cursor: pointer;
    font-family: var(--font-d), 'Luckiest Guy', cursive;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--fbw-accent);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(247, 190, 25, 0.3);
    transition: all var(--fbw-transition-smooth);
    position: relative;
    overflow: hidden;
}

.fbw-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 50%);
    opacity: 0;
    transition: opacity var(--fbw-transition-fast);
}

.fbw-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(247, 190, 25, 0.4);
}

.fbw-cta:hover::before {
    opacity: 1;
}

.fbw-cta:active {
    transform: translateY(0);
}

.fbw-cta:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 190, 25, 0.3), 0 4px 16px rgba(247, 190, 25, 0.3);
}

.fbw-cta__icon {
    font-size: 1.1em;
    line-height: 1;
}

.fbw-cta__text {
    flex: 0 0 auto;
}

.fbw-cta__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.15);
    transition: transform var(--fbw-transition-smooth);
}

.fbw-cta__arrow svg {
    width: 14px;
    height: 14px;
}

.fbw-cta:hover .fbw-cta__arrow {
    transform: translateX(3px);
}

/* Trust Signals */
.fbw-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.fbw-trust__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--fbw-border);
    border-radius: 20px;
    font-family: var(--font-b), 'Open Sans', sans-serif;
    font-size: 12px;
    color: var(--fbw-text-muted);
    transition: all var(--fbw-transition-fast);
}

.fbw-trust__item:hover {
    border-color: var(--fbw-border-hover);
}

.fbw-trust__icon {
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTBOX - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 13, 24, 0.97);
    opacity: 0;
    visibility: hidden;
    transition: all var(--fbw-transition-smooth);
}

.fbw-lightbox[hidden] {
    display: none;
}

.fbw-lightbox.fbw-lightbox--open {
    opacity: 1;
    visibility: visible;
}

.fbw-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all var(--fbw-transition-fast);
    z-index: 10;
}

.fbw-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.fbw-lightbox__close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 190, 25, 0.4);
}

.fbw-lightbox__content {
    width: calc(100vw - 32px);
    height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fbw-lightbox__content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--fbw-radius-md);
    box-shadow: 0 0 80px rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ERROR STATE
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-card--error {
    padding: 24px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--fbw-radius-md);
}

.fbw-card--error p {
    margin: 0;
    color: #fca5a5;
    font-family: var(--font-b), 'Open Sans', sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPACT MODE
   ═══════════════════════════════════════════════════════════════════════════ */

.fbw-product--compact .fbw-product__title {
    font-size: 28px;
}

.fbw-product--compact .fbw-specs {
    display: flex;
    flex-wrap: wrap;
}

.fbw-product--compact .fbw-specs__item {
    flex: 1 1 auto;
    min-width: 120px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes fbw-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fbw-product__gallery {
    animation: fbw-fade-in 0.4s ease-out both;
}

.fbw-product__header {
    animation: fbw-fade-in 0.4s ease-out 0.1s both;
}

.fbw-product__pricing {
    animation: fbw-fade-in 0.4s ease-out 0.15s both;
}

.fbw-product__deposit {
    animation: fbw-fade-in 0.4s ease-out 0.2s both;
}

.fbw-product__specs {
    animation: fbw-fade-in 0.4s ease-out 0.25s both;
}

.fbw-product__cta {
    animation: fbw-fade-in 0.4s ease-out 0.3s both;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET BREAKPOINT (768px+)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .fbw-product {
        padding: 40px 32px;
    }

    .fbw-gallery__thumb {
        width: 72px;
        height: 72px;
    }

    .fbw-product__info {
        margin-top: 32px;
        gap: 24px;
    }

    .fbw-specs {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .fbw-specs__item:nth-child(odd:last-child) {
        grid-column: auto;
    }

    .fbw-cta {
        padding: 14px 24px;
        font-size: 17px;
    }

    .fbw-lightbox__close {
        top: 24px;
        right: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP BREAKPOINT (1024px+)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
    .fbw-product {
        display: grid;
        grid-template-columns: 1fr 480px;
        gap: 48px;
        align-items: start;
        padding: 48px 40px;
    }

    .fbw-product__gallery {
        position: sticky;
        top: 100px;
    }

    .fbw-product__info {
        margin-top: 0;
    }

    .fbw-gallery__main {
        aspect-ratio: 1 / 1;
    }

    .fbw-gallery__thumb {
        width: 80px;
        height: 80px;
    }

    .fbw-specs {
        grid-template-columns: repeat(2, 1fr);
    }

    .fbw-trust {
        gap: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LARGE DESKTOP (1280px+)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
    .fbw-product {
        grid-template-columns: 1fr 520px;
        gap: 64px;
        padding: 56px 48px;
    }

    .fbw-product__title {
        font-size: 52px;
    }

    .fbw-specs {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION PREFERENCE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .fbw-product__gallery,
    .fbw-product__header,
    .fbw-product__pricing,
    .fbw-product__deposit,
    .fbw-product__specs,
    .fbw-product__cta {
        animation: none;
    }

    .fbw-gallery__main img,
    .fbw-gallery__thumb,
    .fbw-price,
    .fbw-specs__item,
    .fbw-cta {
        transition: none;
    }
}