/*
Theme Name: STR Invitations
Theme URI: https://strinvitations.in
Author: STR Invitations
Author URI: https://strinvitations.in
Description: Premium Tamil PSD Design Store — Flex, EDIUS, PNG, WooCommerce Downloads
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: str-invitations
Tags: woocommerce, e-commerce, custom-menu, featured-images, sticky-post
*/

/* ─────────────────────────────────────────
   RESET & ROOT
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #e63946;
  --brand-dark: #c1121f;
  --dark: #0d1117;
  --dark-2: #161b22;
  --dark-3: #21262d;
  --text: #1c1c1e;
  --text-2: #3c3c43;
  --text-3: #6e6e73;
  --border: #e5e5ea;
  --bg: #f5f5f7;
  --white: #ffffff;
  --card-radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
.site-header { background: var(--dark); position: sticky; top: 0; z-index: 100; }
.header-notice { background: var(--brand); padding: 6px 0; text-align: center; font-size: 12px; color: #fff; font-weight: 500; letter-spacing: 0.3px; }
.header-main { display: flex; align-items: center; justify-content: space-between; padding: 0 5%; height: 64px; }

.site-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; background: var(--brand); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; letter-spacing: -0.5px; flex-shrink: 0; }
.logo-text { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: -0.3px; display: block; }
.logo-sub { color: rgba(255,255,255,0.45); font-size: 11px; font-weight: 400; display: block; margin-top: -3px; }
.custom-logo { height: 38px; width: auto; }

/* Primary Nav */
.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav .menu-item { position: relative; }
.primary-nav .menu-item > a { color: rgba(255,255,255,0.7); font-size: 13.5px; font-weight: 500; padding: 8px 14px; border-radius: 6px; display: flex; align-items: center; gap: 5px; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.primary-nav .menu-item > a:hover,
.primary-nav .menu-item.current-menu-item > a,
.primary-nav .menu-item.current-menu-ancestor > a { color: #fff; background: rgba(255,255,255,0.08); }
.primary-nav .menu-item-has-children > a::after { content: ''; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid rgba(255,255,255,0.5); margin-left: 3px; display: inline-block; }

/* Dropdown */
.primary-nav .sub-menu { position: absolute; top: calc(100% + 8px); left: 0; background: var(--dark-2); border: 1px solid var(--dark-3); border-radius: 10px; min-width: 210px; padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all 0.15s; pointer-events: none; z-index: 200; }
.primary-nav .menu-item:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: all; }
.primary-nav .sub-menu li a { display: block; padding: 9px 12px; color: rgba(255,255,255,0.7); font-size: 13px; border-radius: 6px; transition: all 0.1s; }
.primary-nav .sub-menu li a:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-search-toggle { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 7px 12px; color: rgba(255,255,255,0.7); font-size: 13px; display: flex; align-items: center; gap: 6px; transition: all 0.15s; }
.btn-search-toggle:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-account { background: var(--brand); border-radius: 8px; padding: 7px 16px; color: #fff; font-size: 13px; font-weight: 600; transition: background 0.15s; border: none; }
.btn-account:hover { background: var(--brand-dark); }
.btn-cart { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 7px 14px; color: rgba(255,255,255,0.7); font-size: 13px; display: flex; align-items: center; gap: 6px; transition: all 0.15s; position: relative; }
.btn-cart:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cart-count { background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: absolute; top: -6px; right: -6px; }

/* Mobile Menu Toggle */
.menu-toggle { display: none; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 8px 12px; color: #fff; font-size: 18px; line-height: 1; }
.mobile-nav { display: none; background: var(--dark-2); border-top: 1px solid var(--dark-3); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 12px 5%; color: rgba(255,255,255,0.7); font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mobile-nav a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.mobile-nav .sub-menu { background: rgba(0,0,0,0.2); }
.mobile-nav .sub-menu a { padding-left: 8%; font-size: 13px; }

/* ─────────────────────────────────────────
   BREADCRUMB
───────────────────────────────────────── */
.breadcrumb-bar { background: var(--white); border-bottom: 1px solid var(--border); }
.breadcrumb { display: flex; align-items: center; gap: 6px; padding: 10px 5%; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.breadcrumb a { color: var(--text-3); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .current { color: var(--brand); font-weight: 500; }
.breadcrumb-sep { color: var(--border); }

/* ─────────────────────────────────────────
   HOMEPAGE FEATURED
───────────────────────────────────────── */
.featured-section { padding: 28px 5% 0; }
.featured-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 16px; }
.featured-card { position: relative; border-radius: var(--card-radius); overflow: hidden; cursor: pointer; }
.featured-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.featured-card:hover img { transform: scale(1.03); }
.featured-card-big { height: 380px; }
.featured-card-sm { height: 180px; }
.featured-grid-right { display: flex; flex-direction: column; gap: 16px; }
.featured-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.1) 55%, transparent 100%); }
.featured-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 18px; }
.cat-badge { display: inline-block; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px; }
.featured-title { color: #fff; font-size: 15px; font-weight: 600; line-height: 1.35; }
.featured-card-big .featured-title { font-size: 19px; }
.featured-meta { color: rgba(255,255,255,0.6); font-size: 11.5px; margin-top: 6px; }

/* ─────────────────────────────────────────
   CONTENT LAYOUT
───────────────────────────────────────── */
.content-area { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 28px 5% 56px; }
.content-area.full-width { grid-template-columns: 1fr; }

/* Section heading */
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: 17px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; width: 3px; height: 18px; background: var(--brand); border-radius: 2px; }
.view-all-link { font-size: 12.5px; color: var(--brand); font-weight: 600; }

/* ─────────────────────────────────────────
   FILTER BAR
───────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn { padding: 6px 16px; border-radius: 20px; font-size: 12.5px; font-weight: 500; border: 1.5px solid var(--border); background: var(--white); color: var(--text-2); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.filter-btn:hover, .filter-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ─────────────────────────────────────────
   POST / PRODUCT CARDS
───────────────────────────────────────── */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-card { background: var(--white); border-radius: var(--card-radius); overflow: hidden; border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; display: block; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.09); }

.post-thumb { position: relative; overflow: hidden; aspect-ratio: 2/3; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.post-card:hover .post-thumb img { transform: scale(1.05); }

.post-cats { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.post-cat-tag { background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); color: #fff; font-size: 9.5px; font-weight: 600; padding: 2.5px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.post-cat-tag.red { background: var(--brand); }

.price-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); border-radius: 6px; padding: 4px 8px; text-align: center; }
.price-badge .p-now { color: #fff; font-size: 13px; font-weight: 700; line-height: 1; }
.price-badge .p-was { color: rgba(255,255,255,0.5); font-size: 10px; text-decoration: line-through; }
.price-badge.free { background: rgba(34,197,94,0.85); }

.post-body { padding: 14px 14px 16px; }
.post-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a:hover .post-title, .post-title a:hover { color: var(--brand); }
.post-excerpt { font-size: 12px; color: var(--text-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.post-footer-row { display: flex; align-items: center; justify-content: space-between; }
.read-more { font-size: 11.5px; color: var(--brand); font-weight: 600; }
.post-date { font-size: 11px; color: var(--text-3); }
.free-tag { background: #22c55e; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; margin-right: 4px; }

/* ─────────────────────────────────────────
   PAGINATION
───────────────────────────────────────── */
.pagination-wrap { margin-top: 28px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; border: 1px solid var(--border); background: var(--white); color: var(--text-2); transition: all 0.15s; }
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .page-numbers.prev,
.pagination .page-numbers.next { width: auto; padding: 0 14px; font-size: 12.5px; }
.pagination .page-numbers.dots { border: none; background: none; color: var(--text-3); }

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--white); border-radius: var(--card-radius); border: 1px solid var(--border); overflow: hidden; }
.widget .widget-title-wrap { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.widget h2.widget-title { font-size: 13.5px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.5px; }
.widget .widget-inner { padding: 14px 18px; }

/* Offer / Promo banners */
.offer-banner { border-radius: var(--card-radius); overflow: hidden; }
.offer-banner img { width: 100%; transition: transform 0.3s; }
.offer-banner:hover img { transform: scale(1.02); }

/* Latest products widget */
.latest-product-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.latest-product-item:last-child { border-bottom: none; padding-bottom: 0; }
.lp-thumb { width: 56px; height: 72px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.lp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lp-info { flex: 1; min-width: 0; }
.lp-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 5px; }
.lp-name:hover { color: var(--brand); }
.lp-price { display: flex; align-items: center; gap: 5px; }
.lp-price .p-now { font-size: 13px; font-weight: 700; color: var(--brand); }
.lp-price .p-was { font-size: 11px; color: var(--text-3); text-decoration: line-through; }
.lp-price .p-off { font-size: 10px; font-weight: 700; color: #22c55e; background: rgba(34,197,94,0.1); padding: 1px 5px; border-radius: 3px; }

/* Category list widget */
.cat-list li { border-bottom: 1px solid var(--border); }
.cat-list li:last-child { border-bottom: none; }
.cat-list a { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 13px; color: var(--text-2); transition: color 0.15s; }
.cat-list a:hover, .cat-list .current-cat > a { color: var(--brand); }
.cat-count { background: var(--bg); color: var(--text-3); font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; }
.children { padding-left: 14px; }
.children li a { font-size: 12.5px; padding: 7px 0; }

/* Tags cloud */
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px; }
.tagcloud a { padding: 5px 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 11.5px !important; color: var(--text-2); transition: all 0.15s; }
.tagcloud a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Recent posts widget */
.recent-post-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.recent-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.rp-thumb { width: 58px; height: 58px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.rp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rp-title { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rp-title:hover { color: var(--brand); }
.rp-date { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* Newsletter widget */
.newsletter-widget { background: linear-gradient(135deg, var(--dark) 0%, #1a0a0c 100%); border-radius: var(--card-radius); padding: 20px; }
.newsletter-widget h3 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 7px; }
.newsletter-widget p { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5; margin-bottom: 12px; }
.newsletter-widget input { width: 100%; padding: 9px 12px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.07); color: #fff; font-size: 12.5px; outline: none; margin-bottom: 8px; }
.newsletter-widget input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-widget button { width: 100%; background: var(--brand); color: #fff; border: none; padding: 10px; border-radius: 7px; font-size: 13px; font-weight: 700; cursor: pointer; }
.newsletter-widget button:hover { background: var(--brand-dark); }

/* ─────────────────────────────────────────
   CATEGORY HERO
───────────────────────────────────────── */
.cat-hero { position: relative; background: var(--dark); overflow: hidden; }
.cat-hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #0d1117 0%, #1a0a0c 60%, #2d0b11 100%); }
.cat-hero-pattern { position: absolute; inset: 0; opacity: 0.04; background-image: radial-gradient(circle, #fff 1px, transparent 1px); background-size: 28px 28px; }
.cat-hero-glow { position: absolute; right: -80px; top: -80px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(230,57,70,0.15) 0%, transparent 70%); }
.cat-hero-inner { position: relative; z-index: 1; padding: 44px 5% 40px; }
.cat-hero-tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(230,57,70,0.18); border: 1px solid rgba(230,57,70,0.3); color: var(--brand); font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 14px; }
.cat-hero-title { font-size: 32px; font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 12px; }
.cat-hero-title span { color: var(--brand); }
.cat-hero-desc { font-size: 14px; color: rgba(255,255,255,0.55); max-width: 540px; line-height: 1.65; margin-bottom: 22px; }
.cat-hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.cat-stat-num { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
.cat-stat-label { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.sort-select { padding: 6px 12px; border-radius: 8px; border: 1.5px solid var(--border); font-size: 12.5px; background: var(--white); color: var(--text-2); cursor: pointer; outline: none; }
.sort-select:focus { border-color: var(--brand); }
.result-count { font-size: 12px; color: var(--text-3); }

/* ─────────────────────────────────────────
   SINGLE POST / PRODUCT
───────────────────────────────────────── */
.single-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding: 28px 5% 60px; }

.article-header { margin-bottom: 22px; }
.article-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.article-cat { display: inline-block; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.article-cat.secondary { background: var(--bg); color: var(--text-2); border: 1px solid var(--border); }
.article-title { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.25; margin-bottom: 14px; }
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.article-tag { padding: 4px 10px; background: rgba(230,57,70,0.08); border: 1px solid rgba(230,57,70,0.2); border-radius: 5px; font-size: 11.5px; color: var(--brand); font-weight: 500; }
.article-tag:hover { background: var(--brand); color: #fff; }

/* Download CTA Box */
.download-cta { background: var(--dark); border-radius: var(--card-radius); padding: 22px 24px; margin-bottom: 24px; }
.download-cta-name { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.download-cta-price { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.price-now { font-size: 32px; font-weight: 800; color: #fff; line-height: 1; }
.price-was { font-size: 16px; color: rgba(255,255,255,0.35); text-decoration: line-through; }
.price-off-badge { background: #22c55e; color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.btn-buy-now { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--brand); color: #fff; border: none; padding: 14px; border-radius: 9px; font-size: 15px; font-weight: 700; transition: background 0.15s; margin-bottom: 10px; }
.btn-buy-now:hover { background: var(--brand-dark); }
.btn-preview { display: flex; align-items: center; justify-content: center; width: 100%; background: transparent; color: rgba(255,255,255,0.7); border: 1.5px solid rgba(255,255,255,0.15); padding: 12px; border-radius: 9px; font-size: 14px; font-weight: 600; transition: all 0.15s; }
.btn-preview:hover { border-color: rgba(255,255,255,0.4); color: #fff; }

/* What You Get box */
.what-you-get { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 18px 20px; margin: 20px 0; }
.what-you-get h4 { font-size: 14px; font-weight: 700; color: #92400e; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.what-you-get ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.what-you-get ul li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #78350f; }
.what-you-get ul li::before { content: '✓'; font-weight: 700; color: #22c55e; flex-shrink: 0; }

/* Compat note */
.compat-note { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 14px 18px; font-size: 13px; color: #1e40af; margin: 18px 0; display: flex; gap: 10px; align-items: flex-start; }
.compat-note svg { flex-shrink: 0; margin-top: 1px; }

/* Article content */
.article-content { font-size: 14px; line-height: 1.8; color: var(--text-2); }
.article-content h2, .article-content h3 { color: var(--text); font-weight: 700; margin: 22px 0 12px; }
.article-content p { margin-bottom: 14px; }
.article-content ul, .article-content ol { padding-left: 20px; margin-bottom: 14px; }
.article-content li { margin-bottom: 6px; }

/* Gallery */
.gallery-section { margin: 28px 0; }
.gallery-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery-item { aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 24px; color: rgba(255,255,255,0.7); font-size: 28px; cursor: pointer; background: none; border: none; transition: color 0.15s; }
.lightbox-close:hover { color: #fff; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); color: #fff; font-size: 20px; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.6); font-size: 13px; }

/* Social Share */
.social-share { margin: 24px 0; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.social-share h4 { font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; transition: opacity 0.15s; color: #fff; }
.share-btn:hover { opacity: 0.88; }
.share-facebook { background: #1877f2; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #0088cc; }
.share-twitter { background: #000; }

/* Post navigation */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.post-nav-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--card-radius); padding: 16px; transition: all 0.2s; }
.post-nav-item:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(230,57,70,0.1); }
.post-nav-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.post-nav-title { font-size: 13px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Related posts */
.related-posts { margin: 28px 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card { position: relative; border-radius: var(--card-radius); overflow: hidden; aspect-ratio: 3/4; }
.related-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.related-card:hover img { transform: scale(1.04); }
.related-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%); }
.related-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; }
.related-title { color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.35; }

/* ─────────────────────────────────────────
   WOOCOMMERCE SINGLE PRODUCT
───────────────────────────────────────── */
.product-page-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding: 28px 5% 60px; }
.product-main { }

/* ─────────────────────────────────────────
   WOOCOMMERCE OVERRIDES
───────────────────────────────────────── */
.woocommerce-notices-wrapper { padding: 0 5%; }
.woocommerce-message, .woocommerce-error, .woocommerce-info { padding: 12px 18px; border-radius: 8px; margin: 12px 0; font-size: 13.5px; }
.woocommerce-message { background: rgba(34,197,94,0.1); border-left: 4px solid #22c55e; color: #166534; }
.woocommerce-error { background: rgba(230,57,70,0.1); border-left: 4px solid var(--brand); color: #991b1b; }
.woocommerce-info { background: rgba(59,130,246,0.1); border-left: 4px solid #3b82f6; color: #1e40af; }

/* Cart & Checkout */
.woocommerce { padding: 28px 5% 60px; }
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--card-radius); overflow: hidden; border: 1px solid var(--border); }
.woocommerce table.shop_table th { background: var(--bg); padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); border-bottom: 1px solid var(--border); }
.woocommerce table.shop_table td { padding: 14px 16px; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.woocommerce table.shop_table tr:last-child td { border-bottom: none; }
.woocommerce .button, .woocommerce button.button { background: var(--brand); color: #fff; border: none; padding: 11px 22px; border-radius: 8px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background 0.15s; font-family: var(--font); }
.woocommerce .button:hover, .woocommerce button.button:hover { background: var(--brand-dark); color: #fff; }
.woocommerce .button.alt { background: var(--dark); }
.woocommerce .button.alt:hover { background: #000; }
.woocommerce input[type=text], .woocommerce input[type=email], .woocommerce input[type=password], .woocommerce input[type=tel], .woocommerce select, .woocommerce textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: var(--font); outline: none; transition: border-color 0.15s; }
.woocommerce input:focus, .woocommerce select:focus, .woocommerce textarea:focus { border-color: var(--brand); }
.woocommerce .form-row label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; display: block; }
.woocommerce .order-total .amount { color: var(--brand); font-weight: 700; font-size: 18px; }
.woocommerce .woocommerce-Price-amount { color: var(--brand); font-weight: 700; }

/* My Account */
.woocommerce-MyAccount-navigation { background: var(--white); border-radius: var(--card-radius); border: 1px solid var(--border); overflow: hidden; margin-bottom: 20px; }
.woocommerce-MyAccount-navigation ul { list-style: none; }
.woocommerce-MyAccount-navigation ul li a { display: block; padding: 12px 18px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--border); transition: all 0.15s; }
.woocommerce-MyAccount-navigation ul li:last-child a { border-bottom: none; }
.woocommerce-MyAccount-navigation ul li a:hover, .woocommerce-MyAccount-navigation ul li.is-active a { color: var(--brand); background: rgba(230,57,70,0.05); font-weight: 600; }
.woocommerce-MyAccount-content { background: var(--white); border-radius: var(--card-radius); border: 1px solid var(--border); padding: 24px; }
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }

/* ─────────────────────────────────────────
   SEARCH
───────────────────────────────────────── */
.search-hero { background: var(--dark); padding: 32px 5%; }
.search-form-wrap { max-width: 640px; margin: 0 auto; }
.search-label { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 12px; text-align: center; }
.search-label strong { color: #fff; }
.search-input-group { display: flex; background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.search-input-group input[type=search] { flex: 1; border: none; padding: 15px 20px; font-size: 15px; font-family: var(--font); color: var(--text); outline: none; }
.search-input-group button { background: var(--brand); border: none; padding: 15px 28px; font-size: 14px; font-weight: 700; color: #fff; font-family: var(--font); cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; transition: background 0.15s; }
.search-input-group button:hover { background: var(--brand-dark); }

/* ─────────────────────────────────────────
   SEARCH OVERLAY
───────────────────────────────────────── */
.search-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 999; display: none; align-items: flex-start; justify-content: center; padding-top: 80px; backdrop-filter: blur(4px); }
.search-overlay.open { display: flex; }
.search-overlay-box { background: var(--white); border-radius: 16px; width: 90%; max-width: 580px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.3); }
.search-overlay-inner { display: flex; align-items: center; padding: 16px 20px; gap: 12px; border-bottom: 1px solid var(--border); }
.search-overlay-inner svg { color: var(--text-3); flex-shrink: 0; }
.search-overlay-input { flex: 1; border: none; font-size: 16px; font-family: var(--font); color: var(--text); outline: none; }
.search-overlay-input::placeholder { color: var(--text-3); }
.search-overlay-close { font-size: 12px; color: var(--text-3); cursor: pointer; padding: 4px 8px; border-radius: 6px; background: var(--bg); border: none; }
.search-popular { padding: 8px 0 4px; }
.search-popular-label { padding: 8px 20px; font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.search-popular-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; cursor: pointer; transition: background 0.1s; font-size: 13.5px; color: var(--text); }
.search-popular-item:hover { background: var(--bg); }

/* ─────────────────────────────────────────
   MOBILE STICKY BAR
───────────────────────────────────────── */
.mobile-sticky-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--dark); border-top: 1px solid rgba(255,255,255,0.1); padding: 10px 16px 14px; display: none; align-items: center; justify-content: space-between; z-index: 900; }
.mobile-sticky-bar .msticky-text { color: rgba(255,255,255,0.7); font-size: 12px; }
.mobile-sticky-bar .msticky-text strong { color: #fff; font-size: 15px; display: block; }
.mobile-sticky-btn { background: var(--brand); color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; border: none; }

/* ─────────────────────────────────────────
   WHATSAPP FLOAT
───────────────────────────────────────── */
.whatsapp-float { display: none; position: fixed; bottom: 24px; right: 24px; z-index: 800; }
.whatsapp-float a { display: flex; align-items: center; gap: 8px; background: #25d366; color: #fff; padding: 11px 18px; border-radius: 50px; font-size: 13.5px; font-weight: 700; box-shadow: 0 4px 20px rgba(37,211,102,0.4); transition: transform 0.15s; }
.whatsapp-float a:hover { transform: translateY(-2px); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.75); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding: 48px 5% 40px; }
.footer-brand p { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,0.5); margin-top: 14px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.social-icon-btn { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 13px; transition: all 0.15s; }
.social-icon-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.5); transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 5%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { font-size: 12.5px; color: rgba(255,255,255,0.35); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 12px; color: rgba(255,255,255,0.35); transition: color 0.15s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ─────────────────────────────────────────
   404 PAGE
───────────────────────────────────────── */
.error-404 { text-align: center; padding: 80px 5%; }
.error-404 .error-num { font-size: 120px; font-weight: 900; color: var(--brand); line-height: 1; opacity: 0.15; }
.error-404 h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.error-404 p { font-size: 15px; color: var(--text-3); max-width: 440px; margin: 0 auto 28px; }
.btn-home { display: inline-block; background: var(--brand); color: #fff; padding: 12px 28px; border-radius: 8px; font-size: 14px; font-weight: 700; transition: background 0.15s; }
.btn-home:hover { background: var(--brand-dark); }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .featured-card-big { grid-column: 1 / 3; height: 320px; }
  .featured-grid-right { flex-direction: row; }
  .featured-card-sm { height: 220px; flex: 1; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .content-area { grid-template-columns: 1fr; }
  .single-layout { grid-template-columns: 1fr; }
  .product-page-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .woocommerce-account .woocommerce { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .primary-nav { display: none; }
  .menu-toggle { display: block; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card-big { grid-column: 1; height: 260px; }
  .featured-grid-right { flex-direction: column; }
  .header-main { padding: 0 4%; }
  .featured-section, .content-area { padding-left: 4%; padding-right: 4%; }
  .single-layout, .product-page-layout { padding-left: 4%; padding-right: 4%; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .sidebar { grid-template-columns: 1fr; }
  .mobile-sticky-bar { display: flex; }
  .cat-hero-title { font-size: 24px; }
  .article-title { font-size: 20px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .post-nav { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .cat-hero-stats { gap: 16px; }
  .cat-hero-title { font-size: 20px; }
}

/* ─────────────────────────────────────────
   FRONT-PAGE ADDITIONS & ALIASES
   (aliases so front-page.php class names match HTML design)
───────────────────────────────────────── */

/* featured-card-overlay / featured-card-content / featured-card-title aliases */
.featured-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.1) 55%, transparent 100%); }
.featured-card-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 18px; }
.featured-card-title { color: #fff; font-size: 15px; font-weight: 600; line-height: 1.35; }
.featured-card-big .featured-card-title { font-size: 19px; }
.featured-card-meta { color: rgba(255,255,255,0.6); font-size: 11.5px; margin-top: 6px; }

/* Nav wrapper + dropdown nav (for new header.php structure) */
.primary-nav-wrap { flex: 1; display: flex; justify-content: center; }
.primary-nav .nav-item { position: relative; list-style: none; }
.nav-link { color: rgba(255,255,255,0.7); font-size: 13.5px; font-weight: 500; padding: 8px 14px; border-radius: 6px; display: flex; align-items: center; gap: 5px; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.nav-link:hover, .nav-link.active, .current-menu-item .nav-link { color: #fff; background: rgba(255,255,255,0.08); }
.nav-dropdown { position: absolute; top: calc(100% + 8px); left: 0; background: var(--dark-2); border: 1px solid var(--dark-3); border-radius: 10px; min-width: 210px; padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all 0.15s; pointer-events: none; z-index: 200; }
.nav-item.has-dropdown:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: all; }
.dropdown-link { display: block; padding: 9px 12px; color: rgba(255,255,255,0.7); font-size: 13px; border-radius: 6px; transition: all 0.1s; }
.dropdown-link:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* Mobile nav hide primary-nav-wrap on small screens */
@media (max-width: 768px) {
  .primary-nav-wrap { display: none; }
}

/* Sidebar widget aliases (front-page.php uses .sidebar-widget) */
.sidebar-widget { background: var(--white); border-radius: var(--card-radius); border: 1px solid var(--border); overflow: hidden; }
.sidebar-widget .widget-header { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.sidebar-widget .widget-title { font-size: 13.5px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-widget .widget-body { padding: 14px 18px; }

/* Post footer alias (.post-footer instead of .post-footer-row) */
.post-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.post-footer .read-more { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--brand); font-weight: 600; }
.post-footer .read-more.free { color: #22c55e; }
.post-price { font-size: 12.5px; font-weight: 700; color: var(--brand); }

/* post-cat-tag free badge */
.post-cat-tag.free-badge { background: #22c55e; }

/* Post thumb placeholder (no image) */
.post-thumb-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--dark-3); width: 100%; height: 100%; gap: 8px; padding: 16px; }
.post-thumb-placeholder svg { width: 60px; height: 60px; opacity: 0.4; }
.post-thumb-placeholder span { font-size: 11px; color: rgba(255,255,255,0.3); text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Tags cloud alias (.tags-cloud instead of .tagcloud) */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tags-cloud .tag, .tags-cloud a { padding: 5px 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 11.5px; color: var(--text-2); transition: all 0.15s; }
.tags-cloud .tag:hover, .tags-cloud a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Recent post alias (.recent-post instead of .recent-post-item) */
.recent-post { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.recent-post:last-child { border-bottom: none; padding-bottom: 0; }
.recent-thumb { width: 58px; height: 64px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-info .recent-title { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-post:hover .recent-title { color: var(--brand); }
.recent-info .recent-date { font-size: 11px; color: var(--text-3); margin-top: 5px; }

/* Offer banner default (no image set) */
.offer-banner-default { background: linear-gradient(135deg, var(--brand-dark) 0%, #7c0000 100%); border-radius: var(--card-radius); display: block; padding: 22px 20px; text-decoration: none; }
.offer-banner-inner { text-align: center; }
.offer-banner-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.offer-banner-sub { font-size: 12.5px; color: rgba(255,255,255,0.7); margin-bottom: 14px; line-height: 1.5; }
.offer-banner-btn { display: inline-block; background: #fff; color: var(--brand); font-size: 12.5px; font-weight: 700; padding: 8px 18px; border-radius: 6px; }

/* Subscribe widget */
.subscribe-widget { background: linear-gradient(135deg, var(--dark) 0%, #1a0a0c 100%); }
.subscribe-widget .widget-title { color: #fff; }
.subscribe-form { display: flex; flex-direction: column; gap: 8px; }
.subscribe-input { width: 100%; padding: 9px 12px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.07); color: #fff; font-size: 12.5px; outline: none; }
.subscribe-input::placeholder { color: rgba(255,255,255,0.3); }
.subscribe-btn { background: var(--brand); color: #fff; border: none; padding: 10px; border-radius: 7px; font-size: 13px; font-weight: 700; cursor: pointer; width: 100%; }
.subscribe-btn:hover { background: var(--brand-dark); }

/* view-all link alias */
.view-all { font-size: 12.5px; color: var(--brand); font-weight: 600; display: flex; align-items: center; gap: 3px; }
.view-all:hover { color: var(--brand-dark); }

/* Homepage pagination page-btn */
.page-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; font-size: 13px; font-weight: 500; border: 1px solid var(--border); background: var(--white); color: var(--text-2); transition: all 0.15s; }
.page-btn:hover, .page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Sticky WhatsApp CTA */
.sticky-cta { position: fixed; bottom: 20px; right: 20px; background: #25d366; color: #fff; padding: 12px 20px; border-radius: 50px; font-size: 13px; font-weight: 700; box-shadow: 0 4px 20px rgba(37,211,102,0.4); display: flex; align-items: center; gap: 8px; z-index: 999; transition: transform 0.15s, box-shadow 0.15s; }
.sticky-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(37,211,102,0.5); }

/* cat-list sub-list */
.cat-list .sub { padding-left: 14px; }
.cat-list .sub li a { font-size: 12.5px; padding: 7px 0; }
