/*
Theme Name:  HBSO FOOD
Theme URI:   https://hbsofood.com
Author:      HBSO FOOD
Author URI:  https://hbsofood.com
Description: Premium Dates & Traditional Snacks — a modern, catalog-only WordPress theme built with Tailwind CSS. Orders via WhatsApp. No WooCommerce required.
Version:     2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hbso-food
Tags:        custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, responsive-layout, right-sidebar, sticky-post, threaded-comments, translation-ready
*/

/* ========================================================
   BASE OVERRIDES
   Tailwind handles the heavy lifting; these are surgical
   overrides for things Tailwind CDN can't do easily.
   ======================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Skip Link ─────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: #8B4513;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* ── Navigation ─────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow 0.3s ease;
}

/* Desktop nav links */
#primary-menu > li > a,
#mobile-menu > li > a {
    transition: color 0.2s ease;
}

/* Active / current page indicator */
#primary-menu > li.current-menu-item > a,
#primary-menu > li.current-page-ancestor > a {
    color: #8B4513;
    font-weight: 600;
}

/* ── Prose / WP Editor Content ─────────────────────────── */
.prose-content h2 { font-size: 1.5rem; font-weight: 700; color: #5D4037; margin-top: 2rem; margin-bottom: 0.75rem; }
.prose-content h3 { font-size: 1.25rem; font-weight: 600; color: #5D4037; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose-content h4 { font-size: 1.125rem; font-weight: 600; color: #5D4037; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.prose-content p  { line-height: 1.8; margin-bottom: 1.25rem; color: #374151; }
.prose-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose-content li { margin-bottom: 0.375rem; line-height: 1.7; }
.prose-content a  { color: #8B4513; text-decoration: underline; }
.prose-content a:hover { color: #D2691E; }
.prose-content blockquote {
    border-left: 4px solid #8B4513;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6B7280;
}
.prose-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.prose-content th { background: #FFF8E1; color: #5D4037; font-weight: 600; padding: 0.625rem 0.875rem; text-align: left; border: 1px solid #E5E7EB; }
.prose-content td { padding: 0.625rem 0.875rem; border: 1px solid #E5E7EB; }
.prose-content tr:nth-child(even) td { background: #F9FAFB; }
.prose-content img { border-radius: 0.5rem; max-width: 100%; height: auto; }

/* ── Product Specs Table ────────────────────────────────── */
.product-specs-table td:first-child {
    font-weight: 600;
    color: #5D4037;
    width: 38%;
    white-space: nowrap;
}

/* ── Image Gallery ──────────────────────────────────────── */
.gallery-main {
    cursor: zoom-in;
}
.gallery-thumb {
    cursor: pointer;
    transition: opacity 0.2s, ring 0.2s;
}
.gallery-thumb.active {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* ── Lightbox ─────────────────────────────────────────── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}
#lightbox.active {
    display: flex;
}
#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 0.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
#lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

/* ── Stats Counter ──────────────────────────────────────── */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ── FAQ Accordion ──────────────────────────────────────── */
.faq-answer {
    display: none;
    overflow: hidden;
}
.faq-answer.open {
    display: block;
}
.faq-icon {
    transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* ── WhatsApp Float ─────────────────────────────────────── */
#whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9000;
}
#whatsapp-float .tooltip {
    position: absolute;
    right: calc(100% + 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
#whatsapp-float:hover .tooltip {
    opacity: 1;
}

/* ── Toast Notification ─────────────────────────────────── */
.hbso-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 9999;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.925rem;
    font-weight: 500;
    color: #fff;
    min-width: 260px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    opacity: 0;
}
.hbso-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.hbso-toast.success { background: #15803d; }
.hbso-toast.error   { background: #b91c1c; }

/* ── Hero Responsive Backgrounds ───────────────────────── */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── Section Decorative Divider ─────────────────────────── */
.section-divider {
    width: 3.5rem;
    height: 3px;
    background: linear-gradient(90deg, #8B4513, #F4A460);
    border-radius: 2px;
}

/* ── Scroll Indicator ─────────────────────────────────────*/
@keyframes bounceY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}
.scroll-indicator {
    animation: bounceY 1.8s ease-in-out infinite;
}

/* ── Responsive Utilities ────────────────────────────────── */
@media (max-width: 640px) {
    .trust-strip-item + .trust-strip-item::before {
        display: none;
    }
}

/* ── WordPress Alignment Classes ─────────────────────────── */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }

/* ── Accessibility ─────────────────────────────────────── */
:focus-visible {
    outline: 2px solid #8B4513;
    outline-offset: 3px;
    border-radius: 2px;
}

/* ── Print ─────────────────────────────────────────────── */
@media print {
    .site-header, #whatsapp-float, .hbso-toast, nav { display: none !important; }
}

/* ── Language Switcher Dropdown ─────────────────────────── */
.lang-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}
.lang-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s;
}
.lang-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
}
.lang-chevron.is-open {
    transform: rotate(180deg);
}
