:root { --ink: #352b24; --muted: #786d63; --accent: #a8773e; --line: #e7e0d7; --cream: #f7f3ed; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font-family: Arial, sans-serif; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.detail-header { background: #483325; color: #fff; }
.detail-header_inner { max-width: 1320px; margin: auto; padding: 12px 24px; display: flex; align-items: center; gap: 60px; }
.detail-header img, .detail-footer img { display: block; object-fit: cover; object-position: center; border-radius: 5px; }
.detail-header nav { display: flex; gap: 28px; font-weight: 600; }
.detail-container { max-width: 1280px; margin: auto; padding: 0 32px 70px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 12px; padding: 26px 0; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.size-guide { margin-bottom: 36px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 8px 28px #352b2406; }
.size-guide-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px clamp(16px, 3vw, 32px); background: var(--cream); }
.size-guide-heading h2 { font-size: 22px; }
.size-guide-arabic { margin: 4px 0 0; text-align: left; color: var(--muted); font-size: 15px; }
.size-guide-unit { flex-shrink: 0; border: 1px solid var(--line); border-radius: 30px; padding: 7px 12px; color: var(--accent); background: #fff; font-size: 11px; }
.size-guide-unit span { margin-left: 6px; }
.size-guide-scroll { overflow-x: auto; }
.size-guide-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.size-guide-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
.size-guide-table th, .size-guide-table td { padding: 15px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.size-guide-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); }
.size-guide-table thead span { display: block; margin-top: 5px; font-weight: 400; }
.size-guide-table tbody th { color: var(--accent); font-weight: 600; }
.size-guide-table tbody tr:nth-child(even) { background: #fcfaf7; }
.size-guide-table tbody tr:hover { background: var(--cream); }
.size-guide-footer { padding: 14px clamp(16px, 3vw, 32px); color: var(--muted); font-size: 12px; }
.size-guide-footer p { margin: 0; }
.size-guide-footer .size-guide-note { margin-top: 8px; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .size-guide-heading { padding: 18px 14px; flex-wrap: wrap; }
  .size-guide-heading h2 { font-size: 19px; }
  .size-guide-table th, .size-guide-table td { padding: 12px 5px; font-size: 12px; }
  .size-guide-table thead th { font-size: 10px; }
}
.product-description { margin-top: 40px; padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); background: var(--cream); }
.product-description-text { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.8; margin: 18px 0 0; }
.gallery { position: sticky; top: 20px; min-width: 0; }
.gallery-main { width: 100%; height: clamp(440px, 48vw, 650px); display: block; border: 1px solid var(--line); padding: 14px; background: var(--cream); overflow: hidden; position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s; }
.zoom-label { position: absolute; bottom: 16px; right: 16px; padding: 7px 12px; background: #fffffff0; border-radius: 20px; font-size: 12px; color: var(--ink); }
.gallery-thumbnails { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.gallery-thumb { min-width: 0; padding: 8px; background: #fff; color: var(--muted); border: 1px solid var(--line); font-size: 12px; }
.gallery-thumb.is-active { border: 2px solid var(--accent); padding: 7px; color: var(--ink); }
.thumb-image { height: 94px; display: block; overflow: hidden; margin-bottom: 6px; background: var(--cream); }
.thumb-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-caption { color: var(--muted); font-size: 12px; text-align: center; }
.product-heading { display: flex; justify-content: space-between; gap: 18px; align-items: start; margin-bottom: 22px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 10px; letter-spacing: 2px; }
h1 { font-size: 25px; line-height: 1.3; margin: 0; font-weight: 600; }
.product-price { margin: 24px 0 0; color: var(--accent); white-space: nowrap; font-size: 16px; }
.order-form { border: 1px solid var(--line); padding: 24px; }
h2 { font-size: 16px; margin: 0 0 6px; }
h2 span { font-size: 12px; margin-left: 7px; }
.form-intro { font-size: 12px; color: var(--muted); margin: 0 0 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.delivery-options { grid-column: 1 / -1; margin: 0 0 4px; }
.delivery-options label { display: inline-flex; align-items: center; gap: 7px; margin: 5px 18px 5px 0; cursor: pointer; }
.delivery-options input { accent-color: var(--accent); }
[hidden] { display: none !important; }
.field label, legend { display: block; font-size: 12px; margin-bottom: 6px; }
.field label span, legend span { color: var(--muted); }
input:not([type="radio"]), textarea, select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 2px; background: #faf9f7; padding: 11px 10px; color: var(--ink); }
select:disabled { opacity: .6; }
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
textarea { resize: vertical; }
fieldset { padding: 0; border: 0; margin: 22px 0 16px; min-width: 0; }
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-options label { position: relative; }
.size-options input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.size-options span { display: block; min-width: 37px; padding: 7px 10px; text-align: center; border: 1px solid #cbb395; border-radius: 2px; font-size: 12px; }
.size-options input:checked + span { background: #483325; border-color: #483325; color: #fff; }
.size-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field-help { color: var(--muted); font-size: 11px; margin: 8px 0 0; }
.variant-field { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 10px; }
.variant-option { position: relative; cursor: pointer; }
.variant-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.variant-option > span { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; }
.variant-option i { display: block; width: 24px; height: 24px; border: 1px solid #cbb395; border-radius: 50%; background: var(--swatch); }
.variant-option input:checked + span { border-color: var(--accent); background: var(--cream); box-shadow: inset 0 0 0 1px var(--accent); }
.variant-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.note-field { margin: 18px 0; }
.order-summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid #d9bf9f; background: #f6eee3; font-size: 12px; }
.order-submit { display: flex; justify-content: space-between; align-items: center; gap: 30px; border: 0; border-radius: 3px; background: #a8773e; color: #fff; padding: 14px 20px; font-weight: 600; margin-top: 22px; }
.order-submit:hover { background: #483325; }
.notice { padding: 16px; margin-bottom: 20px; font-size: 13px; border: 1px solid; }
.notice p { margin: 8px 0 0; }
.success { border-color: #a4b8a1; background: #f1f7ef; }
.error { border-color: #c97a6b; background: #fff5f2; }
.reference { overflow-wrap: anywhere; }
.detail-footer { border-top: 1px solid var(--line); padding: 35px 20px; text-align: center; background: var(--cream); }
.detail-footer img { margin: auto; }
.detail-footer p { color: var(--muted); }
.copyright { font-size: 12px; margin-top: 26px; }
dialog { border: none; padding: 0; width: min(94vw, 950px); max-width: 94vw; height: 92dvh; max-height: 92dvh; background: var(--cream); }
dialog::backdrop { background: #000b; }
body.has-gallery-dialog { overflow: hidden; }
#gallery-close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font-size: 28px; }
.zoom-scroll { height: 100%; overflow: auto; }
.zoom-scroll img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .product-detail { gap: 24px; }
  .product-heading { flex-direction: column; gap: 10px; }
  .product-price { margin: 0; }
  .order-form { padding: 18px; }
}
@media (max-width: 767px) {
  .detail-header_inner { padding: 10px 18px; justify-content: space-between; gap: 16px; }
  .detail-header img { width: 120px; height: 72px; }
  .detail-header nav { gap: 8px 12px; font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
  .detail-header nav a { white-space: nowrap; }
  .detail-container { padding: 0 16px 40px; }
  .breadcrumbs { padding: 18px 0; }
  .product-detail { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .gallery-main { height: clamp(380px, 125vw, 600px); }
  .thumb-image { height: 84px; }
  .product-heading { flex-direction: row; }
  h1 { font-size: 23px; }
  .product-price { white-space: normal; min-width: 90px; text-align: right; }
  .form-grid { gap: 12px; }
  .order-submit { width: 100%; }
}
@media (max-width: 360px) { .form-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .gallery-main img { transition: none; } }
