.comw-product-box{--comw-accent:#2563eb;--comw-accent-dark:#1d4ed8;--comw-border:#e5e7eb;max-width:480px;border:1px solid var(--comw-border);border-radius:14px;padding:20px;background:#fff;box-sizing:border-box;font-family:inherit;}
.comw-product-box *{box-sizing:border-box;}
.comw-product-summary{display:flex;gap:16px;align-items:center;position:relative;}
/* Background/text color come from Settings > General (inline style, per-render) - only position and shape are fixed here. */
/* background/color/border-radius/padding/margin/width/height all come from
   Settings > General as inline style (see COMW_Checkout::sale_badge_inline_style()) - only structural/typography properties that aren't admin-configurable live here. */
.comw-sale-badge{position:absolute;z-index:2;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;box-shadow:0 4px 10px rgba(15,23,42,.25);}
.comw-sale-badge.comw-badge-pos-top-left{top:0;left:0;}
.comw-sale-badge.comw-badge-pos-top-right{top:0;right:0;}
.comw-sale-badge.comw-badge-pos-bottom-left{bottom:0;left:0;}
.comw-sale-badge.comw-badge-pos-bottom-right{bottom:0;right:0;}
.comw-product-thumb img{width:84px;height:84px;object-fit:cover;border-radius:10px;box-shadow:0 4px 14px rgba(15,23,42,.1);}
.comw-product-info{flex:1;min-width:0;}

.comw-product-summary--gallery{flex-direction:column;align-items:stretch;gap:14px;}
.comw-gallery{display:flex;gap:10px;}
.comw-gallery-main{flex:1;min-width:0;aspect-ratio:1/1;border-radius:12px;overflow:hidden;background:#f3f4f6;cursor:zoom-in;box-shadow:0 8px 24px rgba(15,23,42,.1);}
.comw-gallery-main img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease;}
.comw-gallery-main:hover img{transform:scale(1.18);}
.comw-gallery-thumbs{display:flex;flex-direction:column;gap:8px;overflow-y:auto;max-height:calc(100% + 0px);}
.comw-gallery-thumb{flex:0 0 auto;width:52px;height:52px;padding:0;border-radius:9px;border:2px solid transparent;overflow:hidden;cursor:pointer;background:none;opacity:.65;transition:opacity .15s,border-color .15s,transform .15s;}
.comw-gallery-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.comw-gallery-thumb:hover{opacity:1;transform:translateY(-1px);}
.comw-gallery-thumb.is-active{opacity:1;border-color:var(--comw-accent);}
.comw-product-title{margin:0 0 6px;font-size:17px;font-weight:700;color:#111827;letter-spacing:-.01em;line-height:1.3;}
.comw-product-price{font-size:22px;font-weight:800;color:var(--comw-accent);margin-bottom:10px;letter-spacing:-.01em;}
.comw-product-price .comw-price-was{font-size:15px;font-weight:600;color:#9ca3af;text-decoration:line-through;margin-right:6px;}
.comw-product-price .comw-price-now{font-style:normal;text-decoration:none;color:var(--comw-accent);}
.comw-price-unit{font-size:13px;font-weight:600;color:#9ca3af;}
.comw-buy-now-btn,.comw-submit-btn{background:linear-gradient(135deg,var(--comw-accent),var(--comw-accent-dark));color:#fff;border:none;border-radius:10px;padding:11px 24px;font-size:14px;font-weight:700;letter-spacing:.01em;cursor:pointer;box-shadow:0 6px 16px -4px rgba(37,99,235,.45);transition:box-shadow .15s,transform .15s,opacity .15s;}
.comw-buy-now-btn:hover,.comw-submit-btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px -4px rgba(37,99,235,.5);}
.comw-buy-now-btn:active,.comw-submit-btn:active{transform:translateY(0);}
.comw-submit-btn{width:100%;margin-top:16px;padding:13px;font-size:15px;}
.comw-submit-btn:disabled{opacity:.45;cursor:not-allowed;box-shadow:none;transform:none;}
.comw-out-of-stock{display:inline-block;background:#f3f4f6;color:#6b7280;border-radius:10px;padding:11px 24px;font-size:14px;font-weight:700;}

/* "Order via WhatsApp" - a plain wa.me click-to-chat link (see
   COMW_WhatsApp_Button), styled after WhatsApp's own brand green so it
   reads as its own distinct action next to .comw-buy-now-btn, not a second
   "buy" button. */
.comw-whatsapp-btn{display:inline-flex;align-items:center;gap:7px;margin-top:8px;background:#25D366;color:#fff;border:none;border-radius:10px;padding:10px 20px;font-size:13.5px;font-weight:700;letter-spacing:.01em;text-decoration:none;cursor:pointer;transition:opacity .15s,transform .1s;}
.comw-whatsapp-btn:hover{opacity:.92;color:#fff;}
.comw-whatsapp-btn:active{transform:scale(.98);}

.comw-checkout-panel{margin-top:18px;padding-top:18px;border-top:1px solid var(--comw-border);}

.comw-wc-buy-now{margin-top:20px;padding-top:20px;border-top:1px solid #e5e7eb;}
.comw-wc-buy-now-label{margin:0 0 10px;font-size:13px;color:#6b7280;}
.comw-wc-buy-now .comw-product-box{max-width:none;padding:0;border:none;}
/* WooCommerce already shows the thumbnail/title/price above this - keep only
   the Buy Now button (still inside .comw-product-summary) from that block. */
.comw-wc-buy-now .comw-product-thumb,
.comw-wc-buy-now .comw-product-title,
.comw-wc-buy-now .comw-product-price{display:none;}
.comw-cc-field{margin-bottom:14px;}
.comw-cc-field label{display:block;font-size:12.5px;font-weight:600;color:#374151;margin-bottom:6px;text-transform:uppercase;letter-spacing:.03em;}
.comw-cc-req{color:var(--comw-accent);}
.comw-input{width:100%;height:44px;padding:0 14px;border:1.5px solid var(--comw-border);border-radius:10px;font-size:14.5px;color:#111827;background:#fbfbfc;transition:border-color .15s,box-shadow .15s,background .15s;}
.comw-input:hover{border-color:#c7d2fe;}
.comw-input:focus{outline:none;border-color:var(--comw-accent);background:#fff;box-shadow:0 0 0 4px rgba(37,99,235,.12);}
.comw-qty-input{max-width:110px;}
.comw-qty-input:disabled{background:#f3f4f6;color:#6b7280;cursor:not-allowed;}
.comw-cc-fixed-qty-note{margin:6px 0 0;font-size:12px;color:#6b7280;}

.comw-cc-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.comw-address-block{margin-bottom:4px;}

.comw-price-breakdown{margin:18px 0;padding:16px 18px;border-radius:12px;background:linear-gradient(180deg,#f9fafb,#f3f4f6);border:1px solid var(--comw-border);}
.comw-pb-row{display:flex;justify-content:space-between;font-size:13px;color:#4b5563;padding:5px 0;}
.comw-pb-total-row{margin-top:8px;padding-top:12px;border-top:1px dashed #d1d5db;font-size:16px;font-weight:800;color:#111827;}

.comw-payment-methods{display:flex;flex-direction:column;gap:10px;margin:18px 0 4px;}
.comw-pm-card{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 16px;border:1.5px solid var(--comw-border);border-radius:12px;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s,background .15s;}
.comw-pm-card:hover{border-color:#c7d2fe;background:#f8faff;transform:translateY(-1px);}
.comw-pm-card.is-selected{border-color:var(--comw-accent);background:#f5f8ff;box-shadow:0 6px 16px -4px rgba(37,99,235,.2);}
.comw-pm-name{font-size:14px;font-weight:600;color:#1f2937;}
.comw-pm-card input[type=radio]{position:absolute;opacity:0;width:0;height:0;}
.comw-pm-radio{flex:0 0 auto;width:20px;height:20px;border-radius:50%;border:2px solid #d1d5db;position:relative;transition:border-color .15s;}
.comw-pm-card.is-selected .comw-pm-radio{border-color:var(--comw-accent);}
.comw-pm-card.is-selected .comw-pm-radio:after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--comw-accent);}

.comw-pm-extra-field{margin:0 0 14px;padding:12px 14px;border-radius:9px;background:#f9fafb;border:1px solid var(--comw-border);}
.comw-pm-extra-field .description{margin:0 0 10px;font-size:12.5px;color:#6b7280;line-height:1.5;}
.comw-pm-extra-field .comw-cc-field{margin-bottom:0;}

.comw-no-gateways{margin:14px 0 0;padding:12px 14px;border-radius:9px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:13px;}
.comw-cc-error{margin:12px 0;padding:10px 14px;border-radius:9px;background:#fee2e2;border:1px solid #fca5a5;color:#991b1b;font-size:13px;}

.comw-variations-block{margin-bottom:6px;}
.comw-variation-notice{margin:0 0 14px;padding:9px 12px;border-radius:8px;background:#fee2e2;border:1px solid #fca5a5;color:#991b1b;font-size:12.5px;}

/* External/affiliate product - a plain link out, no checkout panel exists for it at all. */
.comw-external-link-btn{display:inline-block;text-decoration:none;text-align:center;}

/* -----------------------------------------------------------------
 * Product details page popup - the auto-appended buy box (see
 * COMW_Checkout::maybe_append_product_page_buybox()) moves itself into this
 * modal on "Buy Now" instead of expanding .comw-checkout-panel inline, since
 * it's created/removed by comw-checkout.js on demand rather than printed
 * up-front (see openProductPageModal()).
 * ------------------------------------------------------------- */
.comw-buy-modal{position:fixed;inset:0;z-index:100000;display:none;align-items:flex-start;justify-content:center;padding:5vh 16px;overflow-y:auto;}
.comw-buy-modal.is-open{display:flex;}
.comw-buy-modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.6);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);}
.comw-buy-modal-box{position:relative;background:#fff;border-radius:20px;max-width:640px;width:100%;padding:32px;box-shadow:0 30px 80px -12px rgba(15,23,42,.35),0 0 0 1px rgba(15,23,42,.04);}
.comw-buy-modal-close{position:absolute;top:16px;right:16px;width:36px;height:36px;border:none;background:#f3f4f6;border-radius:50%;font-size:20px;line-height:1;color:#4b5563;cursor:pointer;z-index:2;transition:background .15s,color .15s,transform .15s;}
.comw-buy-modal-close:hover{background:#eef2ff;color:var(--comw-accent,#2563eb);transform:rotate(90deg);}
.comw-buy-modal-body .comw-product-box{max-width:none;border:none;padding:0;}
.comw-buybox-placeholder{display:none;}

/* -----------------------------------------------------------------
 * "Product details page" modern layout - only the auto-appended box gets
 * this extra class (see COMW_Checkout::maybe_append_product_page_buybox()).
 * Every other use of .comw-product-box (catalog cards, the popup's own
 * content once moved there, WooCommerce single product page, manually
 * pasted shortcodes elsewhere) keeps its existing .comw-product-summary/
 * .comw-product-info markup and compact card look untouched - this variant
 * gets its own .comw-product-summary--details markup instead (see
 * COMW_Checkout::render_buy_box()`$is_details_layout` branch): image, title,
 * short description and categories all grouped on the left (>=75% width),
 * with only price + Buy Now on the right (capped at 300px / 25%).
 * ------------------------------------------------------------- */
.comw-product-details-layout{position:relative;max-width:1120px;padding:40px;border:1px solid #e2e4e9;border-radius:24px;box-shadow:0 1px 3px rgba(15,23,42,.05),0 24px 56px -28px rgba(15,23,42,.14);overflow:hidden;}
/* Thin accent bar along the top edge - a small, deliberate branded touch
   instead of a plain flat card. Clipped to the card's own rounded corners
   by the `overflow:hidden` above. */
.comw-product-details-layout:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--comw-accent),var(--comw-accent-dark));}

.comw-product-summary--details{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,min(300px,25%));align-items:start;gap:48px;}

.comw-pd-left{display:flex;flex-direction:column;gap:24px;min-width:0;}
.comw-pd-left .comw-gallery-main{aspect-ratio:16/10;border-radius:18px;border:1px solid #e5e7eb;}
.comw-pd-left .comw-gallery-thumbs{max-height:none;}
.comw-pd-left .comw-gallery-thumb{border-color:#e5e7eb;}
.comw-pd-left .comw-gallery-thumb.is-active{border-color:var(--comw-accent);}
.comw-pd-left .comw-product-thumb{width:100%;}
.comw-pd-left .comw-product-thumb img{width:100%;height:auto;aspect-ratio:16/10;border-radius:18px;border:1px solid #e5e7eb;box-shadow:none;}

.comw-pd-text{display:flex;flex-direction:column;align-items:flex-start;gap:14px;}
.comw-pd-text .comw-product-categories,
.comw-pd-text .comw-product-title,
.comw-pd-text .comw-product-short-desc,
.comw-pd-text .comw-product-description{margin:0;}
.comw-pd-text .comw-product-title{position:relative;font-size:34px;font-weight:800;line-height:1.2;letter-spacing:-.02em;color:#0f172a;padding-bottom:16px;}
/* Small accent underline instead of a plain heading. */
.comw-pd-text .comw-product-title:after{content:"";position:absolute;left:0;bottom:0;width:56px;height:4px;border-radius:4px;background:linear-gradient(90deg,var(--comw-accent),var(--comw-accent-dark));}
.comw-pd-text .comw-product-short-desc{font-size:15.5px;line-height:1.75;max-width:60ch;color:#4b5563;}
.comw-pd-text .comw-product-categories{gap:8px;}
.comw-pd-text .comw-product-category-badge{padding:5px 14px;background:linear-gradient(135deg,#eef2ff,#e0e7ff);border:1px solid #c7d2fe;}

/* Full Description - same card as the rest of the box (no separate heading
   or outlined section), just plain flowing text under the title. */
.comw-pd-text .comw-product-description{font-size:15.5px;line-height:1.8;max-width:60ch;color:#4b5563;}
.comw-pd-text .comw-product-description p{margin:0 0 14px;}
.comw-pd-text .comw-product-description p:last-child{margin-bottom:0;}

.comw-pd-right{display:flex;flex-direction:column;align-items:stretch;gap:16px;min-width:0;}
.comw-pd-right .comw-product-price{margin:0;font-size:26px;text-align:center;background:linear-gradient(135deg,#eef2ff,#f5f8ff);border:1.5px solid #c7d2fe;padding:14px 12px;border-radius:14px;word-break:break-word;}
.comw-pd-right .comw-buy-now-btn,
.comw-pd-right .comw-out-of-stock{width:100%;text-align:center;padding:16px 12px;font-size:16px;border-radius:14px;}

/* Sticky right column - as a tall left column (long gallery/description)
   scrolls past, price/Buy Now stay in view instead of scrolling out of
   reach, same as most modern product pages. A vertical rule sets it apart
   from the left column like a proper sidebar, once there's enough width for
   the two-column grid to make sense at all. */
@media (min-width:900px){
	.comw-pd-right{position:sticky;top:24px;border-left:1px solid var(--comw-border);padding-left:40px;}
}

.comw-product-categories{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;}
.comw-product-category-badge{display:inline-block;padding:4px 12px;border-radius:20px;background:#eef2ff;color:#3730a3;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;}

.comw-product-short-desc{margin:4px 0 16px;color:#4b5563;font-size:14.5px;line-height:1.6;}
.comw-product-short-desc p{margin:0 0 8px;}
.comw-product-short-desc p:last-child{margin-bottom:0;}

/* Narrower viewport, or already inside the compact popup box (see
   .comw-buy-modal-body below) - stack right column below left, full width,
   instead of forcing a cramped two-column squeeze. */
@media (max-width:900px){
	.comw-product-details-layout{padding:28px;border-radius:18px;}
	.comw-product-summary--details{grid-template-columns:1fr;gap:28px;}
	.comw-pd-text .comw-product-title{font-size:24px;}
	.comw-pd-text .comw-product-short-desc,
	.comw-pd-text .comw-product-description{max-width:none;}
	.comw-pd-right .comw-product-price{font-size:22px;}
}
@media (max-width:480px){
	.comw-product-details-layout{padding:20px;}
}

/* -----------------------------------------------------------------
 * "Specifications" table - admin-entered Product Features (see
 * COMW_Checkout::render_specifications_table()), printed right after the
 * auto-appended details-page box on a product's own page. Own catalog only,
 * and only when at least one feature is saved.
 * ------------------------------------------------------------- */
.comw-product-specs{max-width:1120px;margin:24px auto 0;padding:32px 40px;border:1px solid #e2e4e9;border-radius:24px;box-shadow:0 1px 3px rgba(15,23,42,.05);box-sizing:border-box;}
.comw-product-specs-title{margin:0 0 18px;font-size:22px;font-weight:800;letter-spacing:-.01em;color:#0f172a;}
.comw-product-specs-table{width:100%;border-collapse:collapse;}
.comw-product-specs-table tr{border-bottom:1px solid #f0f1f3;}
.comw-product-specs-table tr:last-child{border-bottom:none;}
.comw-product-specs-table th,.comw-product-specs-table td{text-align:left;padding:12px 16px;font-size:14.5px;font-weight:400;vertical-align:top;}
.comw-product-specs-table th{width:220px;font-weight:700;color:#374151;background:#f9fafb;}
.comw-product-specs-table td{color:#1f2937;}
@media (max-width:600px){
	.comw-product-specs{padding:22px 20px;border-radius:16px;}
	.comw-product-specs-table th,.comw-product-specs-table td{display:block;width:100%;padding:8px 0;}
	.comw-product-specs-table th{background:none;padding-bottom:2px;}
	.comw-product-specs-table tr{display:block;padding:8px 0;}
}

/* The modal box (.comw-buy-modal-box) already frames this content with its
   own border/shadow/padding - drop the card's own border/shadow/accent-bar
   and the sidebar divider here so it doesn't get framed twice. */
.comw-buy-modal-body .comw-product-details-layout{padding:0;border:none;border-radius:0;box-shadow:none;}
.comw-buy-modal-body .comw-product-details-layout:before{display:none;}
.comw-buy-modal-body .comw-product-summary--details{grid-template-columns:1fr;gap:20px;}
.comw-buy-modal-body .comw-pd-right{position:static;border-left:none;padding-left:0;}
.comw-buy-modal-body .comw-pd-text .comw-product-short-desc,
.comw-buy-modal-body .comw-pd-text .comw-product-description{max-width:none;}
