/*
Theme Name: Bin Ouf Trading
Theme URI: https://binouftrading.com
Author: Bin Ouf Trading
Description: Custom theme for Bin Ouf Trading — Polymers trading division and Berry household products division.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: bin-ouf-trading
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    /* Bin Ouf Trading — corporate palette (from letterhead) */
    --bo-navy: #12154a;
    --bo-navy-dark: #0a0c2e;
    --bo-maroon: #832b3d;
    --bo-maroon-dark: #601f2c;
    --bo-white: #ffffff;
    --bo-ink: #1c1e2e;
    --bo-gray: #6b6f80;
    --bo-gray-light: #e7e8ee;
    --bo-bg: #f6f6fb;

    /* Berry — household sub-brand palette (from product catalogue) */
    --berry-purple: #3d2e5e;
    --berry-purple-dark: #2a2044;
    --berry-green: #8bc43f;
    --berry-green-dark: #6ea62b;
    --berry-lavender: #ece9ff;
    --berry-bg: #f7f6ff;

    /* Shared */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(18,21,74,0.08);
    --shadow-md: 0 8px 24px rgba(18,21,74,0.10);
    --shadow-lg: 0 16px 48px rgba(18,21,74,0.14);
    --container-w: 1200px;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-heading: 'Poppins', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--bo-ink);
    background: var(--bo-white);
    line-height: 1.6;
    font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; color: var(--bo-navy); }
p { margin: 0 0 1em; }

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 24px;
}
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--bo-bg); }

.eyebrow {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bo-maroon);
    margin-bottom: 12px;
}
.section-head { max-width: 720px; margin: 0 0 40px; }
.section-head p { color: var(--bo-gray); font-size: 1.05rem; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}
.btn--primary { background: var(--bo-maroon); color: var(--bo-white); }
.btn--primary:hover { background: var(--bo-maroon-dark); }
.btn--outline { border-color: var(--bo-white); color: var(--bo-white); }
.btn--outline:hover { background: var(--bo-white); color: var(--bo-navy); }
.btn--navy { background: var(--bo-navy); color: var(--bo-white); }
.btn--navy:hover { background: var(--bo-navy-dark); }
.btn--berry { background: var(--berry-purple); color: var(--bo-white); }
.btn--berry:hover { background: var(--berry-purple-dark); }
.btn--berry-outline { border-color: var(--berry-purple); color: var(--berry-purple); }
.btn--berry-outline:hover { background: var(--berry-purple); color: var(--bo-white); }
.btn--sm { padding: 10px 18px; font-size: 0.85rem; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bo-gray-light);
    color: var(--bo-navy);
}
.badge--berry { background: var(--berry-lavender); color: var(--berry-purple); }
.badge--green { background: #eaf6d9; color: var(--berry-green-dark); }

/* ==========================================================================
   Site header
   ========================================================================== */
.site-header {
    background: var(--bo-navy);
    color: var(--bo-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
}
.site-header__logo { display: flex; align-items: center; gap: 12px; }
.site-header__logo img { height: 48px; width: auto; }
.site-header__logo-text {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--bo-white);
}
.site-header__nav { display: flex; align-items: center; gap: 32px; }
.site-header__nav a {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    transition: color 0.2s;
}
.site-header__nav a:hover,
.site-header__nav a.is-active { color: var(--bo-white); }
.site-header__nav .menu-item-has-children { position: relative; }
.site-header__nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bo-white);
    min-width: 220px;
    padding: 10px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.18s ease;
}
.site-header__nav .menu-item-has-children:hover .sub-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.site-header__nav .sub-menu a { color: var(--bo-ink); padding: 8px 12px; border-radius: 6px; display: block; }
.site-header__nav .sub-menu a:hover { background: var(--bo-bg); }
.site-header__actions { display: flex; align-items: center; gap: 14px; }
.menu-toggle { display: none; background: none; border: none; color: var(--bo-white); font-size: 1.6rem; }

@media (max-width: 900px) {
    .site-header__nav { display: none; }
    .menu-toggle { display: block; }
    .site-header__actions .btn span { display: none; }
}

/* ==========================================================================
   Hero sections
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, var(--bo-navy) 0%, var(--bo-navy-dark) 100%);
    color: var(--bo-white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 60%, rgba(131,43,61,0.35) 100%);
    pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 680px; }
.hero h1 { color: var(--bo-white); font-size: clamp(2.2rem, 4vw, 3.2rem); }
.hero p.lead { font-size: 1.15rem; color: rgba(255,255,255,0.82); max-width: 560px; }
.hero__actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

.hero--berry {
    background: linear-gradient(135deg, var(--berry-purple) 0%, var(--berry-purple-dark) 100%);
}
.hero--berry::after {
    background: linear-gradient(115deg, transparent 60%, rgba(139,196,63,0.35) 100%);
}

/* ==========================================================================
   Division cards (home page)
   ========================================================================== */
.divisions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
@media (max-width: 800px) { .divisions-grid { grid-template-columns: 1fr; } }

.division-card {
    border-radius: var(--radius-lg);
    padding: 44px;
    color: var(--bo-white);
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.division-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.division-card--polymers { background: linear-gradient(160deg, var(--bo-navy), var(--bo-navy-dark)); }
.division-card--berry { background: linear-gradient(160deg, var(--berry-purple), var(--berry-purple-dark)); }
.division-card .eyebrow { color: var(--berry-green); }
.division-card--polymers .eyebrow { color: #d98a99; }
.division-card h3 { color: var(--bo-white); font-size: 1.7rem; }
.division-card p { color: rgba(255,255,255,0.82); }
.division-card__link {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem;
    color: var(--bo-white); margin-top: 16px;
}

/* ==========================================================================
   Feature grid / stats
   ========================================================================== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
    background: var(--bo-white);
    border: 1px solid var(--bo-gray-light);
    border-radius: var(--radius-md);
    padding: 32px;
}
.feature-card h3 { font-size: 1.15rem; }
.feature-card p { color: var(--bo-gray); font-size: 0.95rem; margin-bottom: 0; }

.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; text-align: center; }
@media (max-width: 700px) { .stats-row { grid-template-columns: repeat(2,1fr); } }
.stat-item .stat-num { font-family: var(--font-heading); font-weight: 800; font-size: 2.2rem; color: var(--bo-maroon); }
.stat-item .stat-label { color: var(--bo-gray); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ==========================================================================
   Resin category grid (Polymers)
   ========================================================================== */
.resin-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
@media (max-width: 1000px) { .resin-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .resin-grid { grid-template-columns: repeat(2, 1fr); } }
.resin-card {
    background: var(--bo-white);
    border: 1px solid var(--bo-gray-light);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.resin-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.resin-card .resin-name { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; color: var(--bo-navy); }
.resin-card .resin-count { color: var(--bo-gray); font-size: 0.85rem; margin-top: 4px; }
.resin-card p { font-size: 0.85rem; color: var(--bo-gray); margin-top: 10px; }

.grade-pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.grade-pill {
    background: var(--bo-bg);
    border: 1px solid var(--bo-gray-light);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--bo-navy);
}
.tbd-note {
    background: #fff6e5;
    border: 1px solid #f0d78c;
    color: #7a5c00;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 0.88rem;
    margin: 24px 0;
}

/* ==========================================================================
   Berry product grid
   ========================================================================== */
.berry-category-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.berry-category-nav a {
    background: var(--bo-white);
    border: 1px solid var(--berry-lavender);
    color: var(--berry-purple);
    padding: 8px 16px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
}
.berry-category-nav a:hover, .berry-category-nav a.is-active {
    background: var(--berry-purple); color: var(--bo-white); border-color: var(--berry-purple);
}

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
    background: var(--bo-white);
    border: 1px solid var(--bo-gray-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.product-card__img { aspect-ratio: 1/1; overflow: hidden; background: var(--berry-bg); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 18px; }
.product-card__cat { font-size: 0.72rem; color: var(--berry-purple); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.product-card h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.product-card__meta { font-size: 0.82rem; color: var(--bo-gray); }

.product-single { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 900px) { .product-single { grid-template-columns: 1fr; } }
.product-gallery__main { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 12px; background: var(--berry-bg); aspect-ratio: 4/3; }
.product-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumbs { display: flex; gap: 10px; }
.product-gallery__thumbs img {
    width: 76px; height: 76px; object-fit: cover; border-radius: 8px; cursor: pointer;
    border: 2px solid transparent;
}
.product-gallery__thumbs img.is-active { border-color: var(--berry-purple); }
.product-specs { list-style: none; padding: 0; margin: 24px 0; }
.product-specs li {
    display: flex; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--bo-gray-light);
    font-size: 0.95rem;
}
.product-specs li span:first-child { color: var(--bo-gray); }
.product-specs li span:last-child { font-weight: 600; color: var(--bo-navy); }

.related-products { margin-top: 24px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.inquiry-form { display: grid; gap: 18px; }
.inquiry-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .inquiry-form .row-2 { grid-template-columns: 1fr; } }
.inquiry-form label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--bo-navy); margin-bottom: 6px; }
.inquiry-form input, .inquiry-form textarea, .inquiry-form select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--bo-gray-light);
    border-radius: var(--radius-sm); background: var(--bo-white);
}
.inquiry-form input:focus, .inquiry-form textarea:focus, .inquiry-form select:focus {
    outline: none; border-color: var(--bo-maroon);
}
.form-note { font-size: 0.82rem; color: var(--bo-gray); }
.form-success { background: #eafaf0; border: 1px solid #b9e8cb; color: #1a6b3c; padding: 16px 20px; border-radius: var(--radius-sm); }

/* ==========================================================================
   Offices / contact
   ========================================================================== */
.offices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .offices-grid { grid-template-columns: 1fr; } }
.office-card { background: var(--bo-white); border: 1px solid var(--bo-gray-light); border-radius: var(--radius-md); padding: 28px; }
.office-card h3 { font-size: 1.1rem; }
.office-card .badge { margin-bottom: 12px; }
.office-card address { font-style: normal; color: var(--bo-gray); font-size: 0.92rem; line-height: 1.7; }
.office-card a { color: var(--bo-maroon); font-weight: 600; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--bo-navy-dark); color: rgba(255,255,255,0.75); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--bo-white); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer-grid a { color: rgba(255,255,255,0.7); font-size: 0.9rem; display: block; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--bo-white); }
.footer-brand img { height: 40px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; max-width: 320px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 24px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    font-size: 0.82rem;
}

/* ==========================================================================
   Breadcrumb / misc utility
   ========================================================================== */
.breadcrumb { font-size: 0.85rem; color: var(--bo-gray); margin-bottom: 24px; }
.breadcrumb a { color: var(--bo-maroon); }
.page-header-band { background: var(--bo-bg); padding: 40px 0; border-bottom: 1px solid var(--bo-gray-light); }
.page-header-band h1 { margin-bottom: 8px; }
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
