/* BlabTown Storefront Styles */

/* ===== CARDS ===== */
.bt-card-link { text-decoration: none; color: inherit; }
.bt-featured-card, .bt-quote-card, .bt-design-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: all 0.3s ease;
}
.bt-featured-card:hover, .bt-quote-card:hover, .bt-design-card:hover {
    transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.bt-featured-card img, .bt-quote-card img, .bt-design-card img {
    width: 100%; height: auto; display: block; aspect-ratio: 1;
    object-fit: cover;
}
.bt-card-info, .bt-design-info, .bt-quote-text { padding: 15px; }
.bt-quote-text { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.bt-quote-meta { padding: 0 15px 15px; display: flex; gap: 10px; align-items: center; }
.bt-tag { background: #f3f4f6; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.bt-design-count { font-size: 12px; color: #6b7280; }
.bt-cta { color: #2563eb; font-weight: 600; font-size: 14px; }

/* ===== SEARCH ===== */
.bt-search-input {
    width: 100%; max-width: 400px; padding: 12px 20px; border: 2px solid #e5e7eb;
    border-radius: 30px; font-size: 15px; outline: none; transition: border-color 0.2s;
}
.bt-search-input:focus { border-color: #2563eb; }

/* ===== PRODUCT PAGE (Zazzle-style) ===== */
.bt-product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 768px) { .bt-product-layout { grid-template-columns: 1fr; } }

.bt-main-image { border-radius: 12px; overflow: hidden; background: #f9fafb; }
.bt-main-image img { width: 100%; height: auto; display: block; }
.bt-thumbnails { display: flex; gap: 10px; margin-top: 12px; }
.bt-thumb {
    width: 70px; height: 70px; object-fit: cover; border-radius: 8px;
    border: 2px solid transparent; cursor: pointer; transition: border-color 0.2s;
}
.bt-thumb:hover, .bt-thumb.active { border-color: #2563eb; }

.bt-breadcrumb { font-size: 13px; color: #6b7280; margin-bottom: 10px; }
.bt-breadcrumb a { color: #2563eb; text-decoration: none; }
.bt-product-title { font-size: 24px; font-weight: 700; margin: 0 0 5px; line-height: 1.3; }
.bt-product-subtitle { color: #6b7280; margin: 0 0 15px; }

.bt-price-display { margin: 15px 0; }
.bt-price { font-size: 28px; font-weight: 700; color: #111; }
.bt-price-per { font-size: 14px; color: #6b7280; margin-left: 5px; }

.bt-option-group { margin: 20px 0; }
.bt-option-label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 8px; }
.bt-size-chart-link { font-weight: 400; color: #2563eb; font-size: 12px; margin-left: 8px; }

.bt-option-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.bt-opt-btn {
    padding: 8px 18px; border: 2px solid #e5e7eb; border-radius: 8px; background: #fff;
    cursor: pointer; font-size: 14px; transition: all 0.2s;
}
.bt-opt-btn:hover { border-color: #2563eb; }
.bt-opt-btn.active { border-color: #2563eb; background: #eff6ff; color: #2563eb; font-weight: 600; }

/* Color swatches */
.bt-color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.bt-swatch {
    width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent;
    cursor: pointer; transition: all 0.2s; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}
.bt-swatch:hover { transform: scale(1.15); }
.bt-swatch.active { border-color: #2563eb; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2563eb; }

/* Quantity */
.bt-qty-wrap { display: flex; align-items: center; gap: 0; }
.bt-qty-btn {
    width: 36px; height: 36px; border: 2px solid #e5e7eb; background: #fff;
    cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.bt-qty-btn:first-child { border-radius: 8px 0 0 8px; }
.bt-qty-btn:last-child { border-radius: 0 8px 8px 0; }
#bt-qty-input {
    width: 50px; height: 36px; text-align: center; border: 2px solid #e5e7eb;
    border-left: none; border-right: none; font-size: 15px;
}

/* Actions */
.bt-product-actions { display: flex; gap: 12px; margin-top: 25px; }
.bt-btn-cart {
    flex: 1; padding: 15px 30px; background: #111; color: #fff; border: none; border-radius: 10px;
    font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.bt-btn-cart:hover { background: #2563eb; }
.bt-btn-wishlist {
    width: 52px; height: 52px; border: 2px solid #e5e7eb; border-radius: 10px;
    background: #fff; font-size: 22px; cursor: pointer; transition: all 0.2s;
}
.bt-btn-wishlist:hover { border-color: #ef4444; color: #ef4444; }

.bt-trust-badges {
    margin-top: 25px; padding-top: 20px; border-top: 1px solid #e5e7eb;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; color: #6b7280;
}

/* ===== BUTTONS ===== */
.bt-btn { padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; font-size: 14px; }
.bt-btn-primary { background: #2563eb; color: #fff; }
.bt-btn-primary:hover { background: #1d4ed8; }
.bt-btn-outline { background: transparent; border: 2px solid #e5e7eb; }
.bt-btn-lg { padding: 14px 32px; font-size: 16px; }

/* ===== GALLERY ===== */
.bt-gallery-item { border-radius: 8px; overflow: hidden; }
.bt-gallery-item img { width: 100%; height: auto; display: block; transition: transform 0.3s; }
.bt-gallery-item:hover img { transform: scale(1.05); }

/* ===== MODAL ===== */
.bt-modal { position: fixed; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.bt-modal-content { background: #fff; border-radius: 16px; padding: 30px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
.bt-modal-close { float: right; font-size: 28px; cursor: pointer; color: #999; }

/* ===== QUOTE HEADER ===== */
.bt-quote-header { text-align: center; padding: 30px 0; }
.bt-quote-title { font-size: 32px; font-weight: 800; }
.bt-quote-subtitle { color: #6b7280; font-size: 16px; }
.bt-style-tag { font-size: 12px; color: #2563eb; text-transform: uppercase; letter-spacing: 1px; }


/* ── Size selector — ensure WooCommerce variations table shows ── */
.variations_form table.variations { display: table !important; width: 100%; margin-bottom: 15px; }
.variations_form table.variations tr { display: table-row !important; }
.variations_form table.variations td,
.variations_form table.variations th { display: table-cell !important; padding: 5px 8px 10px 0; vertical-align: middle; }
.variations_form table.variations th { font-weight: 600; font-size: 14px; white-space: nowrap; padding-right: 12px; }
.variations_form table.variations select { 
    width: 100%; min-width: 120px; padding: 8px 12px; 
    border: 2px solid #e5e7eb; border-radius: 8px; 
    font-size: 14px; cursor: pointer;
    background: #fff;
}
.variations_form table.variations select:focus { border-color: #111; outline: none; }
/* Hide the color row — we use swatches instead */
.variations_form table.variations tr:has(select[name="attribute_pa_color"]) { display: none !important; }

/* ── Size buttons ── */
.bt-size-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bt-size-btn {
    padding: 7px 14px; border: 2px solid #d1d5db; border-radius: 6px;
    background: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.15s; color: #111; min-width: 46px; text-align: center;
}
.bt-size-btn:hover { border-color: #111; background: #f9fafb; }
.bt-size-btn.active { border-color: #111; background: #111; color: #fff; }
.bt-size-btn.unavailable { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }

/* Hide WooCommerce default variations table — we use custom UI */
.variations_form table.variations { display: none !important; }

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ===== FOOTER ===== */
.bt-footer {
    background: var(--bt-charcoal, #1a1a1a);
    color: #c8c8c8;
    font-family: var(--bt-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    padding: 64px 0 0;
    margin-top: 80px;
}
.bt-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}
.bt-footer-wordmark {
    font-family: var(--bt-font-heading, 'Playfair Display', serif);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}
.bt-footer-logo { text-decoration: none; display: inline-block; margin-bottom: 16px; }
.bt-footer-logo-img { max-height: 36px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
.bt-footer-tagline { color: #999; line-height: 1.6; margin: 0 0 8px; max-width: 260px; font-size: 13px; }
.bt-footer-made { font-size: 12px; color: #666; margin: 0 0 20px; }
.bt-footer-social { display: flex; gap: 12px; }
.bt-footer-social a {
    color: #888;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.bt-footer-social a:hover { color: #fff; }
.bt-footer-col h4 {
    font-family: var(--bt-font-body, 'DM Sans', sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 18px;
}
.bt-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bt-footer-col ul li { margin-bottom: 10px; }
.bt-footer-col ul li a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    line-height: 1;
}
.bt-footer-col ul li a:hover { color: #fff; }
.bt-footer-bottom {
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 20px 32px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #555;
}
.bt-footer-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}
.bt-footer-badges img {
    height: 20px;
    width: auto;
    max-width: 48px;
    object-fit: contain;
    opacity: 0.7;
}
@media (max-width: 768px) {
    .bt-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; padding: 0 20px; }
    .bt-footer-brand { grid-column: 1 / -1; }
    .bt-footer-bottom { flex-direction: column; text-align: center; padding: 20px; }
}
@media (max-width: 480px) {
    .bt-footer-inner { grid-template-columns: 1fr; }
}

/* ===== QUOTES PAGE ===== */
.bt-quotes-page-header {
    text-align: center;
    padding: 40px 0 30px;
}
.bt-quotes-page-header h1 {
    font-family: var(--bt-font-heading, 'Playfair Display', serif);
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    color: var(--bt-charcoal, #1a1a1a);
    margin: 0 0 10px;
    line-height: 1.2;
}
.bt-quotes-page-header p {
    color: var(--bt-muted, #888);
    font-size: 16px;
    margin: 0 0 24px;
}
.bt-quote-search-wrap {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}
.bt-quote-search-wrap input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    border: 2px solid var(--bt-border, #e8e8e8);
    border-radius: 999px;
    font-size: 15px;
    font-family: var(--bt-font-body, 'DM Sans', sans-serif);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    background: #fff;
}
.bt-quote-search-wrap input:focus {
    border-color: var(--bt-brand, #4A6FA5);
    box-shadow: 0 0 0 3px rgba(74,111,165,.12);
}
.bt-quote-search-wrap .bt-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bt-muted, #888);
    pointer-events: none;
}
.bt-quotes-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.bt-quote-card-v2 {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--bt-shadow, 0 2px 12px rgba(0,0,0,.08));
    transition: transform .25s, box-shadow .25s;
}
.bt-quote-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: var(--bt-shadow-hover, 0 8px 30px rgba(0,0,0,.14));
}
.bt-quote-card-v2 .bt-qc-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.bt-quote-card-v2 .bt-qc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}
.bt-quote-card-v2:hover .bt-qc-image img { transform: scale(1.05); }
.bt-quote-card-v2 .bt-qc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, rgba(0,0,0,0.6));
}
.bt-quote-card-v2 .bt-qc-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.bt-quote-card-v2 .bt-qc-body {
    padding: 18px;
}
.bt-quote-card-v2 .bt-qc-text {
    font-family: var(--bt-font-heading, 'Playfair Display', serif);
    font-size: 15px;
    font-style: italic;
    line-height: 1.5;
    color: var(--bt-charcoal, #1a1a1a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 8px;
}
.bt-quote-card-v2 .bt-qc-meta {
    font-size: 12px;
    color: var(--bt-muted, #888);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bt-quote-card-v2 .bt-qc-arrow {
    color: var(--bt-brand, #4A6FA5);
    font-size: 16px;
    opacity: 0;
    transition: opacity .2s, transform .2s;
}
.bt-quote-card-v2:hover .bt-qc-arrow { opacity: 1; transform: translateX(3px); }

/* Quote detail header */
.bt-quote-detail-header {
    background: linear-gradient(135deg, #f0f4f9 0%, #faf9f7 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.bt-quote-detail-header::before {
    content: '"';
    font-family: var(--bt-font-heading, serif);
    font-size: 200px;
    color: rgba(74,111,165,0.06);
    position: absolute;
    top: -40px;
    left: 20px;
    line-height: 1;
    pointer-events: none;
}
.bt-quote-detail-text {
    font-family: var(--bt-font-heading, 'Playfair Display', serif);
    font-size: clamp(20px, 4vw, 32px);
    font-style: italic;
    color: var(--bt-charcoal, #1a1a1a);
    line-height: 1.4;
    margin: 0 0 12px;
    position: relative;
}

/* ===== GALLERY PAGE ===== */
.bt-gallery-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.bt-gallery-page-header h1 {
    font-family: var(--bt-font-heading, 'Playfair Display', serif);
    font-size: clamp(24px, 4vw, 38px);
    margin: 0;
    color: var(--bt-charcoal, #1a1a1a);
}
.bt-gallery-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bt-filter-btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1.5px solid var(--bt-border, #e8e8e8);
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    font-family: var(--bt-font-body, sans-serif);
}
.bt-filter-btn:hover, .bt-filter-btn.active {
    background: var(--bt-brand, #4A6FA5);
    color: #fff;
    border-color: var(--bt-brand, #4A6FA5);
}
.bt-gallery-grid-v2 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}
.bt-gallery-card {
    text-decoration: none;
    color: inherit;
    display: block;
}
.bt-gallery-card-inner {
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    transition: transform .25s, box-shadow .25s;
}
.bt-gallery-card:hover .bt-gallery-card-inner {
    transform: translateY(-4px);
    box-shadow: var(--bt-shadow-hover, 0 8px 30px rgba(0,0,0,.14));
}
.bt-gallery-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.bt-gallery-card-info {
    padding: 10px 12px 12px;
}
.bt-gallery-card-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    color: var(--bt-charcoal, #1a1a1a);
}
.bt-gallery-card-type {
    font-size: 11px;
    color: var(--bt-muted, #888);
    margin-bottom: 2px;
}
.bt-gallery-card-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--bt-brand, #4A6FA5);
}
.bt-load-more-wrap {
    text-align: center;
    margin-top: 40px;
}
.bt-load-more-btn {
    background: transparent;
    color: var(--bt-brand, #4A6FA5);
    border: 2px solid var(--bt-brand, #4A6FA5);
    padding: 13px 40px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--bt-font-body, sans-serif);
    transition: all .2s;
}
.bt-load-more-btn:hover {
    background: var(--bt-brand, #4A6FA5);
    color: #fff;
}
.bt-load-more-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

@media (max-width: 900px) {
    .bt-gallery-grid-v2 { grid-template-columns: repeat(3, 1fr); }
    .bt-quotes-grid-v2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .bt-gallery-grid-v2 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .bt-quotes-grid-v2 { grid-template-columns: 1fr; }
    .bt-quote-detail-header { padding: 24px 20px; }
}
