/*
Theme Name: dooble
Theme URI: https://dooble.local
Author: dooble
Description: Handcrafted leather goods store with a bento-box design and a "Contact to Purchase" flow (payment-ready for a future Stripe upgrade).
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dooble
*/

:root {
    /* Muted Sunset & Matcha Palette */
    --matcha: #DCE2C8;
    --coral: #F5D5CB;
    --mauve: #E1D5DF;
    --butter: #FDF4DE;
    --sky: #D4E1E8;

    /* Dark Leathery Tones */
    --charcoal: #333333;
    --espresso: #2B1D14;
    --bg-color: #FAFAFA;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 2rem;
    background-color: var(--bg-color);
    font-family: 'Poppins', sans-serif;
    color: var(--charcoal);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* Layout wrapper */
.site-wrap { max-width: 1200px; margin: 0 auto; }

/* Bento Box Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Generic Card Styles */
.card {
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 30px rgba(43, 29, 20, 0.1);
}

/* Typography */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--espresso);
    margin: 0;
}

p { font-size: 0.95rem; line-height: 1.6; margin-top: 0.5rem; }

/* Header */
.site-header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 1.5rem auto;
    padding: 1.5rem 1.75rem;
    background-color: var(--mauve);
    border-radius: 24px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
}

.site-header:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(43, 29, 20, 0.05);
}

.site-header .brand { text-align: center; }

.site-header .brand h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 2.4rem;
    letter-spacing: -1.5px;
    color: var(--espresso);
    margin: 0;
    line-height: 1;
}

.site-header .brand h1 .dot { color: var(--coral); }

.site-header .brand p {
    font-weight: 200;
    font-style: italic;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    margin: 0.3rem 0 0;
    opacity: 0.8;
}

.site-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.site-nav a {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    color: var(--espresso);
    padding: 0.5rem 0.9rem;
    border-radius: 20px;
    background: var(--butter);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

/* Playful multi-color pills */
.site-nav a:nth-child(5n+1) { background: var(--sky); }
.site-nav a:nth-child(5n+2) { background: var(--coral); }
.site-nav a:nth-child(5n+3) { background: var(--matcha); }
.site-nav a:nth-child(5n+4) { background: var(--butter); }
.site-nav a:nth-child(5n+5) { background: #EAD7EF; }

.site-nav a:hover {
    transform: translateY(-3px) rotate(-3deg);
    box-shadow: 0 6px 14px rgba(43, 29, 20, 0.12);
}

/* Carousel Block */
.carousel-block {
    grid-column: span 4;
    grid-row: span 2;
    padding: 0;
    position: relative;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 2.5rem;
}

.carousel-slide .tag {
    background: rgba(255, 255, 255, 0.85);
    padding: 1.5rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 450px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-info { display: flex; flex-direction: column; }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--butter);
    color: var(--espresso);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-btn:hover { background: var(--espresso); color: #fff; transform: translateY(-50%) scale(1.1); }
.carousel-btn.prev { left: 1.5rem; }
.carousel-btn.next { right: 1.5rem; }

/* Text/Color Blocks */
.statement-block { background-color: var(--coral); grid-column: span 2; grid-row: span 1; display: flex; justify-content: center; text-align: center; }
.statement-block h3 { font-size: 1.5rem; margin-bottom: 0.2rem; }

.color-block { background-color: var(--matcha); grid-column: span 2; grid-row: span 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.color-block p { font-size: 1.05rem; }

/* Category Cards */
.category-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; }
.category-card:hover { transform: scale(1.05) rotate(-2deg); }
.category-card h3 { font-size: 1.8rem; margin-bottom: 0.2rem; color: var(--espresso); }
.category-card span { font-family: 'Poppins', sans-serif; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; opacity: 0.6; font-weight: 600; }

.cat-bags { background-color: var(--sky); }
.cat-shoes { background-color: var(--butter); }
.cat-wallets { background-color: var(--matcha); }
.cat-crochet { background-color: var(--mauve); }

/* Wide Sections */
.product-small { background-color: var(--sky); grid-column: span 2; grid-row: span 1; background-size: cover; background-position: center 30%; }
.feature-block { background-color: var(--butter); grid-column: span 2; grid-row: span 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.feature-block h2 { font-size: 2rem; }

/* Buttons */
.btn {
    background-color: var(--espresso);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}
.btn:hover { background-color: var(--charcoal); transform: scale(1.05); }
.btn-block { display: block; width: 100%; }

/* ---------- Product Archive / Grid ---------- */
.page-head { max-width: 1200px; margin: 0 auto 1.5rem auto; text-align: center; }
.page-head h1 { font-size: 2.5rem; }
.page-head p { opacity: 0.7; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    box-shadow: 0 6px 18px rgba(43, 29, 20, 0.05);
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(43, 29, 20, 0.12); }

.product-card .thumb { aspect-ratio: 1 / 1; background-size: cover; background-position: center; background-color: var(--sky); }
.product-card .body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.product-card h3 { font-size: 1.3rem; }
.product-card .price { font-weight: 600; color: var(--espresso); }
.product-card .item-no { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.55; font-weight: 600; }
.product-card .cta { margin-top: auto; padding-top: 1rem; }

/* ---------- Single Product ---------- */
.dooble-single { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.dooble-single .gallery { border-radius: 24px; overflow: hidden; background: var(--sky); }
.dooble-single .gallery .main-image { aspect-ratio: 1 / 1; background-size: cover; background-position: center; }
.dooble-single .gallery .thumbs { display: flex; gap: 0.75rem; padding: 0.75rem; flex-wrap: wrap; }
.dooble-single .gallery .thumbs .t { width: 64px; height: 64px; border-radius: 12px; background-size: cover; background-position: center; cursor: pointer; opacity: 0.7; transition: opacity 0.2s; }
.dooble-single .gallery .thumbs .t:hover { opacity: 1; }

.dooble-single .details { padding: 0.5rem; }
.dooble-single .details .eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; opacity: 0.6; font-weight: 600; }
.dooble-single .details h1 { font-size: 2.6rem; margin: 0.4rem 0; }
.dooble-single .details .price { font-size: 1.6rem; font-weight: 600; color: var(--espresso); }
.dooble-single .details .item-no { font-size: 0.8rem; opacity: 0.6; margin-top: 0.25rem; }
.dooble-single .details .desc { margin: 1.5rem 0; }

/* Contact-to-purchase form */
.purchase-form {
    background: var(--butter);
    border-radius: 24px;
    padding: 2rem;
    margin-top: 1.5rem;
    scroll-margin-top: 2rem;
    transition: box-shadow 0.4s ease;
}
.purchase-form.highlight {
    box-shadow: 0 0 0 3px var(--coral), 0 15px 30px rgba(43, 29, 20, 0.12);
}
.purchase-form h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.purchase-form .field { margin-bottom: 1rem; }
.purchase-form label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.4rem; opacity: 0.75; }
.purchase-form input, .purchase-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(43, 29, 20, 0.15);
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    background: #fff;
    color: var(--charcoal);
}
.purchase-form input:focus, .purchase-form textarea:focus { outline: none; border-color: var(--espresso); }
.purchase-form textarea { resize: vertical; min-height: 90px; }
.purchase-form .hp { position: absolute; left: -9999px; }
.form-notice { padding: 1rem 1.25rem; border-radius: 16px; margin-bottom: 1.5rem; font-weight: 600; }
.form-notice.success { background: var(--matcha); color: var(--espresso); }
.form-notice.error { background: var(--coral); color: var(--espresso); }

.back-link { display: block; max-width: 1200px; margin: 0 auto 1.5rem; font-size: 0.85rem; font-weight: 600; opacity: 0.7; }
.back-link:hover { opacity: 1; }

/* Footer */
.site-footer { max-width: 1200px; margin: 3rem auto 0; text-align: center; padding: 2rem; opacity: 0.6; font-size: 0.85rem; }

/* Toast */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--espresso);
    color: #fff;
    text-align: center;
    border-radius: 30px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    bottom: 30px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s, visibility 0.3s;
    left: 50%;
    transform: translateX(-50%);
}
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }

/* Responsive */
@media (max-width: 1024px) {
    .grid-container { grid-template-columns: repeat(2, 1fr); }
    .carousel-block { grid-column: span 2; }
    .statement-block, .color-block, .product-small, .feature-block { grid-column: span 2; }
    .dooble-single { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .grid-container { grid-template-columns: 1fr; }
    .carousel-block, .statement-block, .product-small, .color-block, .feature-block, .category-card { grid-column: span 1; }
    body { padding: 1rem; }
    .site-header { padding: 1.25rem 1.25rem; margin-bottom: 1.5rem; flex-direction: column; align-items: center; text-align: center; }
    .site-header .brand { text-align: center; }
    .site-header .brand h1 { font-size: 2.4rem; }
    .site-nav { justify-content: center; }
    .carousel-slide { padding: 1.5rem; }
    .carousel-slide .tag { flex-direction: column; align-items: flex-start; gap: 1rem; max-width: 100%; }
    .btn { width: 100%; }
}
