/* ============================================
   CM HOME DECOR — STUDIO WHITE PRODUCT PAGE
   Shared stylesheet for all product subpages
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --surface-base: #FFFFFF;
    --surface-alt: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: #424245;
    --text-muted: #86868B;
    --accent: #FF3B30;
    --card-border: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--surface-base);
    color: var(--text-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar — minimal, Apple-style */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-alt); }
::-webkit-scrollbar-thumb { background: #D2D2D7; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === HEADER === */
.sw-header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    padding: 10px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.sw-header.scrolled {
    top: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

.sw-header-logo {
    height: 42px;
    width: auto;
    filter: brightness(0) saturate(100%);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.sw-header-logo:hover { opacity: 1; }

.sw-header-nav { display: flex; align-items: center; gap: 32px; }

.sw-header-nav a {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.sw-header-nav a:hover { color: var(--accent); }

.sw-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.1s ease;
}

@media (max-width: 768px) {
    .sw-header-nav { display: none; }
    .sw-menu-btn { display: flex; }
}

.sw-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sw-menu-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.08);
}

.sw-mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 90%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 16px;
    z-index: 99;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sw-mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sw-mobile-menu a {
    display: block;
    padding: 12px 20px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.sw-mobile-menu a:hover { background: var(--surface-alt); }

@media (max-width: 768px) {
    .sw-header-nav { display: none; }
    .sw-menu-btn { display: block; }
}

/* === HERO SECTION === */
.sw-hero {
    padding: 140px 0 80px;
    background: var(--surface-base);
    text-align: center;
}

.sw-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1.05;
}

.sw-hero p {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.sw-hero-divider {
    width: 48px;
    height: 4px;
    background: var(--accent);
    margin: 24px auto 0;
    border-radius: 2px;
}

/* === PRODUCT GRID === */
.sw-product-grid {
    padding: 0 0 80px;
    background: var(--surface-alt);
}

.sw-product-grid-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 1024px) { .sw-product-grid-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .sw-product-grid-inner { grid-template-columns: 1fr; } }

/* === PRODUCT CARD — Title on top of image overlay === */
.sw-product-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface-base);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.sw-product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(255, 59, 48, 0.15);
}

.sw-product-card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.sw-product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.sw-product-card:hover .sw-product-card-img {
    transform: scale(1.08);
}

/* Overlay with Title + Price on top of image */
.sw-product-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.sw-product-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.sw-product-card-price {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #FF6B63;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Card body below image */
.sw-product-card-body {
    padding: 16px 20px 20px;
}

.sw-product-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.sw-product-card-rating svg {
    width: 16px;
    height: 16px;
    fill: #F59E0B;
}

.sw-product-card-rating span {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 4px;
}

.sw-product-card-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    background: transparent;
    border: 1.5px solid rgba(255, 59, 48, 0.25);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.01em;
}

.sw-product-card-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Hot Deal badge */
.sw-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 4px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: var(--accent);
    border-radius: 100px;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
}

/* === OFFCANVAS (Studio White) === */
body.offcanvas-open { overflow: hidden; }

#offcanvas-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

#offcanvas-backdrop.active { opacity: 1; pointer-events: auto; }

#offcanvas {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 95vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(0,0,0,0.08);
    border-radius: 32px 32px 0 0;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    color: var(--text-primary);
}

#offcanvas.active { transform: translateY(0); }

#offcanvas .offcanvas-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

#offcanvas .offcanvas-desc {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

#offcanvas .offcanvas-price {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--accent);
}

#offcanvas .offcanvas-specs h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

#offcanvas .offcanvas-specs .spec-key {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
}

#offcanvas .offcanvas-specs .spec-val {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
}

.sw-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--surface-alt);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sw-close-btn:hover {
    background: var(--accent);
    color: #fff;
}

.sw-contact-btn {
    display: inline-block;
    padding: 16px 40px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    background: var(--accent);
    border-radius: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.sw-contact-btn:hover {
    background: #E0342B;
    transform: scale(1.02);
}

/* === FOOTER (Studio White) === */
.sw-footer {
    background: var(--surface-alt);
    padding: 60px 0 40px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.sw-footer h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.sw-footer h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.sw-footer p,
.sw-footer a,
.sw-footer li {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
}

.sw-footer a:hover { color: var(--accent); }
.sw-footer li { margin-bottom: 8px; }

.sw-footer-divider {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.06);
    text-align: left;
}

.sw-footer-divider p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-logo {
    height: 32px;
    width: auto;
    filter: invert(1);
    opacity: 0.9;
}

.footer-copyright {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #111111;
}

.sw-footer-social a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.04);
    color: var(--text-muted);
    transition: all 0.3s ease;
    margin-right: 8px;
}

.sw-footer-social a:hover { background: var(--accent); color: #fff; }
.sw-footer-social svg { width: 18px; height: 18px; }

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.6s ease-out;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === IMAGE MODAL === */
#image-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

#image-modal.active {
    display: flex;
}

#image-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

/* === SERVICE CARDS (reused from services page) === */
.sw-service-card {
    position: relative;
    background: var(--surface-base);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.sw-service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.sw-service-card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.sw-service-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.sw-service-card:hover .sw-service-card-img-wrap img {
    transform: scale(1.08);
}

.sw-service-card-body {
    padding: 24px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sw-service-card-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.sw-service-card-body .sw-price {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.sw-service-card-body p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}
