:root {
  --cg-bg: #faf6ef;
  --cg-ink: #1d2b27;
  --cg-brass: #9a7b3f;
  --cg-sand: #efe6d3;
  --cg-sand-2: #e4d8bf;
  --cg-muted: #5b5440;
  --cg-serif: "Playfair Display", Georgia, serif;
  --cg-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Blocksy palette overrides */
  --theme-palette-color-1: #9a7b3f;
  --theme-palette-color-2: #1d2b27;
  --theme-palette-color-3: #1d2b27;
  --theme-palette-color-4: #1d2b27;
  --theme-palette-color-5: #e4d8bf;
  --theme-palette-color-6: #efe6d3;
  --theme-palette-color-7: #faf6ef;
  --theme-palette-color-8: #ffffff;
  --theme-text-color: #1d2b27;
  --theme-link-initial-color: #1d2b27;
  --theme-link-hover-color: #9a7b3f;
  --theme-button-background-initial-color: #1d2b27;
  --theme-button-background-hover-color: #9a7b3f;
  --theme-button-text-initial-color: #faf6ef;
  --theme-button-text-hover-color: #ffffff;
  --theme-form-field-border-initial-color: #c9bd9f;
  --theme-border-color: #e4d8bf;
}
[lang="ar"], [lang^="ar-"] { --cg-serif: "Tajawal", system-ui, sans-serif; --cg-sans: "Tajawal", system-ui, sans-serif; }

body.cg { background: var(--cg-bg); color: var(--cg-ink); font-family: var(--cg-sans); }
body.cg h1, body.cg h2, body.cg h3, body.cg .entry-title { font-family: var(--cg-serif); font-weight: 500; color: var(--cg-ink); }
.cg-wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }

/* Announcement + header */
.cg-announce { background: var(--cg-ink); color: #e9dcc0; text-align: center; font-size: 13px; padding: 7px 12px; }
.cg-header { background: var(--cg-bg); border-bottom: 1px solid var(--cg-sand-2); position: sticky; top: 0; z-index: 50; }
.cg-header__row { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.cg-logo { font-family: var(--cg-serif); font-size: 24px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--cg-ink); text-decoration: none; white-space: nowrap; }
.cg-nav { display: flex; gap: 22px; flex: 1; justify-content: center; font-size: 14px; }
.cg-nav a, .cg-tools a { color: var(--cg-ink); text-decoration: none; }
.cg-nav a:hover, .cg-tools a:hover { color: var(--cg-brass); }
.cg-nav__track { display: none; }
.cg-tools { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.cg-account, .cg-cart { display: inline-flex; align-items: center; gap: 8px; }
.cg-account svg, .cg-cart svg { display: block; }
.cg-cart__icon { position: relative; display: inline-flex; }
.cg-cart-count { position: absolute; top: -8px; inset-inline-end: -10px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--cg-ink); color: #fff; font-size: 11px; text-align: center; line-height: 18px; }
.cg-cart-total { white-space: nowrap; }
@media (max-width: 600px) { .cg-cart-total { font-size: 13px; } .cg-tools { gap: 12px; } }
.cg-burger { display: none; background: none; border: 0; font-size: 24px; color: var(--cg-ink); padding: 4px; cursor: pointer; }
.cg-lang .trp-language-switcher { width: auto !important; height: auto !important; }
.cg-lang .trp-language-switcher > div { padding: 2px 8px !important; border-radius: 4px; border-color: var(--cg-sand-2) !important; background: transparent !important; }

/* Buttons and pills */
.cg-btn { display: inline-block; background: var(--cg-ink); color: var(--cg-bg) !important; padding: 12px 24px; border-radius: 2px; text-decoration: none; font-size: 14px; font-weight: 500; border: 0; cursor: pointer; }
.cg-btn:hover { background: var(--cg-brass); }
.cg-btn--small { padding: 8px 16px; font-size: 13px; }
.cg-pill { display: inline-block; background: var(--cg-sand); color: var(--cg-brass); font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 999px; letter-spacing: .3px; }

/* Hero */
.cg-hero { display: grid; grid-template-columns: 1fr 1fr; background: var(--cg-sand); min-height: 420px; }
.cg-hero__text { padding: 56px max(20px, 5vw); align-self: center; }
.cg-eyebrow { font-size: 12px; letter-spacing: 2px; color: var(--cg-brass); font-weight: 600; }
.cg-hero h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.12; margin: 12px 0; }
.cg-hero p { font-size: 17px; max-width: 460px; color: var(--cg-muted); margin-bottom: 22px; }
.cg-hero__note { margin-top: 16px; font-size: 13px; color: var(--cg-muted); }
.cg-hero__image { background-size: cover; background-position: center; min-height: 280px; }

.cg-trust { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; padding: 16px 20px; font-size: 14px; border-bottom: 1px solid var(--cg-sand-2); }

/* Sections */
.cg-wrap h2 { font-size: 28px; margin: 48px 0 20px; }
.cg-compare__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cg-compare__col { padding: 24px; border-radius: 4px; }
.cg-compare__col.is-old { background: var(--cg-sand); color: var(--cg-muted); }
.cg-compare__col.is-new { background: var(--cg-ink); color: #f3ead6; }
.cg-compare__col.is-new h3 { color: #fff; }
.cg-compare__col h3 { font-size: 20px; margin: 0 0 10px; }
.cg-compare__col ul { margin: 0; padding-inline-start: 20px; line-height: 1.9; }

.cg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cg-card { display: flex; flex-direction: column; gap: 8px; }
.cg-card__img { display: block; background: var(--cg-sand); aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.cg-card__img img { width: 100%; height: 100%; object-fit: cover; }
.cg-card h3 { font-family: var(--cg-sans); font-size: 15px; font-weight: 500; margin: 0; }
.cg-card h3 a { color: var(--cg-ink); text-decoration: none; }
.cg-card__price { font-weight: 600; }
.cg-card .cg-btn { align-self: flex-start; }

.cg-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 56px; }
.cg-tile { position: relative; display: flex; align-items: flex-end; aspect-ratio: 4 / 3; background-size: cover; background-position: center; border-radius: 4px; overflow: hidden; text-decoration: none; }
.cg-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(29,43,39,.85), rgba(29,43,39,.1) 65%); }
.cg-tile span { position: relative; color: #fff; font-family: var(--cg-serif); font-size: 20px; padding: 16px; }

/* Footer */
.cg-footer { background: var(--cg-ink); color: #d9ccb0; margin-top: 40px; padding: 40px 0; font-size: 14px; }
.cg-footer__perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 4px 0 28px; border-bottom: 1px solid rgba(217,204,176,.35); }
.cg-footer__perks strong { display: block; color: #fff; font-size: 15px; margin-bottom: 4px; }
.cg-footer__perks span { margin: 0; line-height: 1.5; }
.cg-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 32px 0; }
.cg-footer__brand p { max-width: 320px; line-height: 1.6; }
.cg-footer__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid rgba(217,204,176,.35); }
.cg-footer__bar span { margin: 0; }
.cg-footer a:hover { color: #fff; }
.cg-footer h3 { color: #fff; font-size: 16px; margin: 0 0 10px; }
.cg-footer a, .cg-footer span { display: block; color: #d9ccb0; margin-bottom: 6px; text-decoration: none; }
.cg-footer .cg-logo { color: #fff; }

/* Shop/product tweaks */
.woocommerce ul.products li.product .cg-pill { margin: 6px 0 0; }
.woocommerce .star-rating span::before { color: var(--cg-brass); }

/* Mobile */
@media (max-width: 900px) {
  .cg-hero { grid-template-columns: 1fr; }
  .cg-hero__image { order: -1; min-height: 220px; }
  .cg-grid, .cg-tiles { grid-template-columns: repeat(2, 1fr); }
  .cg-compare__grid { grid-template-columns: 1fr; }
  .cg-footer__perks, .cg-footer__cols { grid-template-columns: 1fr 1fr; }
  .cg-footer__bar { flex-direction: column; align-items: flex-start; }
  .cg-burger { display: block; }
  .cg-header__row { gap: 12px; flex-wrap: wrap; }
  .cg-logo { font-size: 20px; flex: 1; }
  .cg-tools__track { display: none; }
  .cg-nav { display: none; flex-basis: 100%; order: 5; flex-direction: column; gap: 0; padding-bottom: 10px; }
  .cg-nav.is-open { display: flex; }
  .cg-nav a { padding: 12px 0; border-top: 1px solid var(--cg-sand-2); }
  .cg-nav__track { display: block; }
}
.woocommerce-checkout #billing_country_field { display: none; }
.cg-lang { font-weight: 600; border: 1px solid var(--cg-sand-2); border-radius: 4px; padding: 2px 10px; }
.trp-floating-switcher { display: none !important; }
.cg-tile span em { display: block; font-family: var(--cg-sans); font-style: normal; font-size: 13px; margin-top: 4px; color: #e9dcc0; }
.cg-delivery-note { font-size: 14px; color: var(--cg-muted); margin: 8px 0 16px; }

/* Footer icons, social, legal links, payment badges */
.cg-footer__perks > div { display: flex; gap: 14px; align-items: flex-start; }
.cg-footer__perks svg { flex: none; color: #fff; margin-top: 2px; }
.cg-social { display: flex; gap: 14px; margin-top: 14px; }
.cg-social a { display: inline-flex; margin: 0; color: #fff; }
.cg-social svg { width: 24px; height: 24px; }
.cg-footer__bar { flex-wrap: wrap; }
.cg-footer__legal { display: flex; gap: 20px; flex-wrap: wrap; }
.cg-footer__legal a { margin: 0; }
.cg-pays { display: flex; justify-content: center; gap: 8px; padding-top: 22px; }
.cg-footer .cg-pay { display: block; margin: 0; }
/* Header tools: centre icons, count badge and total on one line */
.cg-tools { line-height: 1; }
.cg-cart-total { line-height: 1; padding-top: 1px; }

/* Real product photos: hero collage and "shop by need" tiles */
.cg-hero__collage { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; padding: 24px; background: var(--cg-sand-2, #efe6d3); }
.cg-hero__collage a { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 6px; overflow: hidden; }
.cg-hero__collage a:first-child { grid-row: 1 / span 2; }
.cg-hero__collage img { width: 100%; height: 100%; object-fit: contain; }
.cg-tile--photo { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; background: #fff; border: 1px solid var(--cg-sand-2, #efe6d3); }
.cg-tile--photo::before { display: none; }
.cg-tile--photo img { position: absolute; inset: 0 0 64px 0; width: 100%; height: calc(100% - 64px); object-fit: contain; padding: 12px; }
.cg-tile--photo span { position: relative; background: var(--cg-ink); color: #fff; padding: 12px 16px; min-height: 64px; box-sizing: border-box; }
@media (max-width: 800px) { .cg-hero__collage { padding: 12px; } }

.cg-tiles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cg-tile--photo { max-width: 460px; }

/* Product options as buttons */
.cg-opts__native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cg-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.cg-opt { border: 1px solid var(--cg-sand-2, #d9ccb0); background: #fff; color: var(--cg-ink); border-radius: 999px; padding: 8px 16px; font-size: 14px; line-height: 1.2; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cg-opt:hover:not(:disabled) { border-color: var(--cg-ink); }
.cg-opt.is-on { background: var(--cg-ink); color: #fff; border-color: var(--cg-ink); }
.cg-opt:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.variations .reset_variations { display: inline-block; margin-top: 6px; font-size: 13px; }

.single_variation .woocommerce-variation-price { display: none; }

/* Hero collage v2: one wide feature photo on top, two squares beneath, photos fill their frames */
.cg-hero__collage { grid-template-columns: 1fr 1fr; grid-template-rows: 1.15fr 1fr; }
.cg-hero__collage a:first-child { grid-column: 1 / span 2; grid-row: auto; }
.cg-hero__collage img { object-fit: cover; }

/* Hero collage v3: three equal, medium-size photos (no oversized feature image) */
.cg-hero__collage { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr; align-content: center; gap: 12px; padding: 24px; max-height: 460px; }
.cg-hero__collage a:first-child { grid-column: auto; }
.cg-hero__collage a { aspect-ratio: 3 / 4; }
.cg-hero__collage img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 800px) { .cg-hero__collage { max-height: none; } .cg-hero__collage a { aspect-ratio: 1; } }
.cg-disclaimer { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--cg-muted, #6b6b66); }

/* Bigger product photos, click to enlarge, product video */
.single-product .product-entry-wrapper { max-width: min(1280px, 94vw); gap: 48px; }
.single-product .product-entry-wrapper .woocommerce-product-gallery { flex: 0 0 58%; max-width: 58%; }
.single-product .product-entry-wrapper .summary { flex: 1 1 0; min-width: 0; }
.woocommerce-product-gallery .flexy-items .ct-media-container { cursor: zoom-in; }
@media (max-width: 800px) { .single-product .product-entry-wrapper .woocommerce-product-gallery { flex: 0 0 100%; max-width: 100%; } }
.cg-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(20,28,25,.92); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.cg-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 4px; }
.cg-video { max-width: min(1280px, 94vw); margin: 32px auto; }
.cg-video h2 { font-size: 22px; margin-bottom: 12px; }
.cg-video video { width: 100%; max-height: 560px; background: #000; border-radius: 6px; }

/* Product page v2: professional proportions (photo capped, neat frame, thumbnails underneath) */
.single-product .product-entry-wrapper { max-width: 1120px; gap: 56px; align-items: flex-start; }
.single-product .product-entry-wrapper .woocommerce-product-gallery { flex: 0 0 480px; max-width: 480px; width: 480px; }
.woocommerce-product-gallery .flexy-items .ct-media-container { aspect-ratio: 1 / 1; max-height: 480px; background: #fff; border: 1px solid var(--cg-sand-2, #efe6d3); border-radius: 6px; overflow: hidden; }
.woocommerce-product-gallery .flexy-items .ct-media-container img { width: 100%; height: 100%; object-fit: contain; }
.woocommerce-product-gallery .flexy-pills, .woocommerce-product-gallery .ct-product-gallery-container ol, .woocommerce-product-gallery [class*="thumb"] img { border-radius: 4px; }
@media (max-width: 900px) {
  .single-product .product-entry-wrapper { gap: 24px; }
  .single-product .product-entry-wrapper .woocommerce-product-gallery { flex: 0 0 100%; max-width: 100%; width: 100%; }
  .woocommerce-product-gallery .flexy-items .ct-media-container { max-height: 420px; }
}
