/*
Theme Name: Emberama
Theme URI: https://emberama.etsy.com
Author: Emberama
Author URI: https://emberama.etsy.com
Description: A warm, gallery-style theme for Emberama — atmospheric art prints and digital collections.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: emberama
Tags: art, gallery, portfolio, e-commerce, custom-colors
*/

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --em-cream: #F7F2EA;
    --em-cream-dark: #EDE6DA;
    --em-warm-dark: #2C2218;
    --em-amber: #B8834A;
    --em-amber-hover: #A37340;
    --em-amber-light: #D4A76A;
    --em-brown-mid: #7A6B5D;
    --em-brown-light: #A89882;
    --em-warm-border: #E2D9CC;
    --em-dark-bg: #1E1A14;
    --em-white: #FFFFFF;
    --em-etsy: #F1641E;
    --em-etsy-hover: #D9551A;
    --em-tag-bg: rgba(184, 131, 74, 0.1);
    --em-overlay: rgba(30, 26, 20, 0.45);
    --em-radius: 8px;
    --em-radius-lg: 12px;
    --em-font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --em-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --em-max-width: 1200px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--em-font-body);
    background: var(--em-cream);
    color: var(--em-warm-dark);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
}

/* ── Site Header ── */
.site-header {
    border-bottom: 1px solid var(--em-warm-border);
    background: var(--em-cream);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .header-inner {
    max-width: var(--em-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
}

.site-logo {
    font-family: var(--em-font-display);
    font-size: 26px;
    font-weight: 500;
    color: var(--em-warm-dark);
    letter-spacing: 0.04em;
}

.site-logo a { color: inherit; }
.site-logo img { max-height: 40px; }

/* Main Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
}

.main-navigation a {
    font-size: 14px;
    color: var(--em-brown-mid);
    letter-spacing: 0.03em;
    transition: color 0.2s;
    padding-bottom: 3px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    color: var(--em-warm-dark);
    border-bottom: 1.5px solid var(--em-amber);
}

.nav-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--em-brown-mid);
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s;
}

.nav-search-toggle:hover { color: var(--em-warm-dark); }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--em-warm-dark);
    font-size: 24px;
}

/* Search Overlay */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--em-overlay);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.search-overlay.active { display: flex; }

.search-overlay .search-form {
    background: var(--em-cream);
    padding: 32px;
    border-radius: var(--em-radius-lg);
    width: 90%;
    max-width: 560px;
}

.search-overlay .search-field {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--em-warm-border);
    border-radius: var(--em-radius);
    font-size: 18px;
    font-family: var(--em-font-body);
    background: var(--em-white);
    color: var(--em-warm-dark);
    outline: none;
}

.search-overlay .search-field:focus {
    border-color: var(--em-amber);
}

.search-overlay .search-submit {
    display: none;
}

.search-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: var(--em-cream);
    font-size: 32px;
    cursor: pointer;
}


/* ── Hero Slideshow ── */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    max-height: 700px;
    overflow: hidden;
    background: var(--em-dark-bg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; }

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--em-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 560px;
    padding: 0 32px;
    color: var(--em-cream);
}

.hero-content h1 {
    font-family: var(--em-font-display);
    font-size: 48px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-content p {
    font-size: 17px;
    color: #D4CEC4;
    line-height: 1.7;
    margin-bottom: 24px;
}

.hero-btn {
    display: inline-block;
    padding: 12px 32px;
    border: 1px solid rgba(247, 242, 234, 0.4);
    color: var(--em-cream);
    font-size: 14px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    transition: background 0.3s, border-color 0.3s;
}

.hero-btn:hover {
    background: rgba(247, 242, 234, 0.1);
    border-color: rgba(247, 242, 234, 0.7);
}

.hero-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(30, 26, 20, 0.4);
    color: var(--em-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border: none;
    pointer-events: auto;
    transition: background 0.2s;
}

.hero-arrow:hover { background: rgba(30, 26, 20, 0.7); }

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(247, 242, 234, 0.3);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.3s;
}

.hero-dot.active { background: var(--em-amber-light); }


/* ── Content Sections ── */
.section-products {
    max-width: var(--em-max-width);
    margin: 0 auto;
    padding: 48px 32px 64px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.section-header h2 {
    font-family: var(--em-font-display);
    font-size: 28px;
    font-weight: 400;
    color: var(--em-warm-dark);
}

.section-header .view-all {
    font-size: 13px;
    color: var(--em-amber);
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.section-header .view-all:hover { color: var(--em-amber-hover); }


/* ── Category Filters ── */
.category-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.category-filter {
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 13px;
    border: 1px solid var(--em-warm-border);
    color: var(--em-brown-mid);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.category-filter:hover {
    border-color: var(--em-amber);
    color: var(--em-amber);
}

.category-filter.active {
    background: var(--em-amber);
    color: var(--em-white);
    border-color: var(--em-amber);
}


/* ── Product Grid ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    border-radius: var(--em-radius);
    overflow: hidden;
    background: var(--em-white);
    border: 1px solid var(--em-warm-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(44, 34, 24, 0.08);
}

.product-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--em-cream-dark);
}

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

.product-card:hover .product-card-image img {
    transform: scale(1.03);
}

.product-card-thumbs {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.product-card-thumbs img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    object-fit: cover;
    cursor: pointer;
    transition: border-color 0.2s;
}

.product-card-thumbs img:hover {
    border-color: var(--em-amber-light);
}

.product-card-body {
    padding: 16px 18px 20px;
}

.product-card-body h3 {
    font-family: var(--em-font-display);
    font-size: 20px;
    font-weight: 400;
    color: var(--em-warm-dark);
    margin-bottom: 4px;
}

.product-card-body h3 a {
    color: inherit;
    transition: color 0.2s;
}

.product-card-body h3 a:hover { color: var(--em-amber); }

.product-meta {
    font-size: 13px;
    color: var(--em-brown-light);
    margin-bottom: 10px;
}

.product-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.product-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--em-tag-bg);
    color: var(--em-amber);
    transition: background 0.2s;
}

.product-tag:hover {
    background: rgba(184, 131, 74, 0.2);
}

.product-links {
    display: flex;
    gap: 8px;
}

.btn-etsy,
.btn-gumroad,
.btn-redbubble {
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-etsy {
    background: var(--em-etsy);
    color: var(--em-white);
}

.btn-etsy:hover { background: var(--em-etsy-hover); }

.btn-gumroad {
    background: var(--em-warm-dark);
    color: var(--em-cream);
}

.btn-gumroad:hover { opacity: 0.85; }

.btn-redbubble {
    background: #E41321;
    color: var(--em-white);
}

.btn-redbubble:hover { opacity: 0.85; }


/* ── Single Product Page ── */
.single-product-wrap {
    max-width: var(--em-max-width);
    margin: 0 auto;
    padding: 48px 32px 64px;
}

.single-product-header {
    margin-bottom: 32px;
}

.single-product-header h1 {
    font-family: var(--em-font-display);
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 8px;
}

.single-product-meta {
    font-size: 14px;
    color: var(--em-brown-light);
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Product Gallery Carousel ── */
.product-carousel {
    position: relative;
    margin-bottom: 48px;
    background: var(--em-dark-bg);
    border-radius: var(--em-radius-lg);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.carousel-viewport {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.carousel-track.dragging {
    transition: none;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    pointer-events: none;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(247, 242, 234, 0.15);
    color: var(--em-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    border: none;
    z-index: 10;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.carousel-arrow:hover {
    background: rgba(247, 242, 234, 0.3);
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

.carousel-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(247, 242, 234, 0.7);
    background: rgba(30, 26, 20, 0.5);
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}


/* ── Product Description Prose ── */
.single-product-description {
    max-width: 720px;
    margin-bottom: 48px;
    font-family: var(--em-font-display);
    font-size: 19px;
    line-height: 1.85;
    color: #4A3D30;
    letter-spacing: 0.005em;
}

.single-product-description p {
    margin-bottom: 1.4em;
}

.single-product-description p:last-child {
    margin-bottom: 0;
}

.single-product-description a {
    color: var(--em-amber);
    border-bottom: 1px solid var(--em-amber-light);
    transition: border-color 0.2s;
}

.single-product-description a:hover {
    border-color: var(--em-amber);
}

.single-product-description strong {
    color: var(--em-warm-dark);
    font-weight: 500;
}

.single-product-description em {
    font-style: italic;
    color: var(--em-brown-mid);
}

.single-product-description blockquote {
    border-left: 3px solid var(--em-amber-light);
    padding: 4px 0 4px 20px;
    margin: 1.6em 0;
    font-style: italic;
    color: var(--em-brown-mid);
}

.single-product-description ul,
.single-product-description ol {
    margin: 1em 0 1.4em 1.2em;
    line-height: 1.8;
}

.single-product-description li {
    margin-bottom: 0.4em;
}

.single-product-description h2,
.single-product-description h3,
.single-product-description h4 {
    font-family: var(--em-font-display);
    font-weight: 400;
    color: var(--em-warm-dark);
    margin: 2em 0 0.6em;
}

.single-product-description h2 { font-size: 26px; }
.single-product-description h3 { font-size: 22px; }
.single-product-description h4 { font-size: 19px; }

.single-product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 48px;
}

.single-product-actions .btn-etsy,
.single-product-actions .btn-gumroad {
    font-size: 15px;
    padding: 12px 28px;
}

.single-product-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


/* ── Archive / Listing Page ── */
.archive-header {
    max-width: var(--em-max-width);
    margin: 0 auto;
    padding: 48px 32px 0;
}

.archive-header h1 {
    font-family: var(--em-font-display);
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 8px;
}

.archive-header .archive-description {
    font-size: 15px;
    color: var(--em-brown-mid);
    max-width: 600px;
    line-height: 1.7;
}


/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 32px 0;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--em-radius);
    font-size: 14px;
    border: 1px solid var(--em-warm-border);
    color: var(--em-brown-mid);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--em-amber);
    color: var(--em-amber);
}

.pagination .current {
    background: var(--em-amber);
    color: var(--em-white);
    border-color: var(--em-amber);
}


/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--em-warm-border);
    background: var(--em-cream);
}

.site-footer .footer-inner {
    max-width: var(--em-max-width);
    margin: 0 auto;
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 13px;
    color: var(--em-brown-light);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: var(--em-brown-mid);
    font-size: 18px;
    transition: color 0.2s;
}

.footer-socials a:hover { color: var(--em-amber); }


/* ── Lightbox ── */
.em-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30, 26, 20, 0.92);
    z-index: 300;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.em-lightbox.active { display: flex; }

.em-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--em-radius);
}

.em-lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: var(--em-cream);
    font-size: 36px;
    cursor: pointer;
}


/* ── WordPress Required ── */
.alignleft { float: left; margin-right: 20px; }
.alignright { float: right; margin-left: 20px; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--em-brown-light); }


/* ── Responsive ── */
@media (max-width: 900px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 36px; }
    .hero-slideshow { height: 50vh; min-height: 320px; }
    .single-product-description { font-size: 17px; }
    .carousel-viewport { height: 400px; }
    .carousel-slide { padding: 16px; }
}

@media (max-width: 640px) {
    .menu-toggle { display: block; }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--em-cream);
        border-bottom: 1px solid var(--em-warm-border);
        padding: 16px 32px;
    }

    .main-navigation.open { display: block; }

    .main-navigation ul {
        flex-direction: column;
        gap: 16px;
    }

    .product-grid { grid-template-columns: 1fr; }

    .site-header .header-inner { padding: 14px 20px; }
    .section-products { padding: 32px 20px 48px; }
    .hero-content h1 { font-size: 28px; }
    .hero-content p { font-size: 15px; }

    .site-footer .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .carousel-viewport { height: 280px; }
    .carousel-slide { padding: 12px; }
    .carousel-arrow { width: 36px; height: 36px; font-size: 18px; }
    .carousel-prev { left: 10px; }
    .carousel-next { right: 10px; }

    .single-product-description {
        font-size: 16px;
        line-height: 1.75;
    }
}
