/* =========================================
   1. SINGLE PRODUCT PRICE & PACK SIZE HIERARCHY
   ========================================= */

.g1-pd-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

/* Scoped to single product wrapper — overrides the base rule in frontend.css */
.g1-pd-price-wrapper .pd-price-container {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

/* ── HERO PRICE (single product page only) ──────────────────────────────── */
/* Scoped under .g1-pd-price-wrapper so these large sizes NEVER bleed       */
/* into Related Products, archive loops, or any card grid.                  */
.g1-pd-price-wrapper .pd-price-now,
.g1-pd-price-wrapper .pd-price-now .woocommerce-Price-amount,
.g1-pd-price-wrapper .pd-price-now .woocommerce-Price-currencySymbol,
.g1-pd-price-wrapper .pd-price-now bdi {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: var(--brand, #0E6B5C) !important;
    line-height: 1 !important;
}

/* MRP: "MRP" prefix is a plain text node; wc_price() is wrapped in <s class="pd-mrp-strike"> */
.g1-pd-price-wrapper .pd-price-mrp,
.g1-pd-price-wrapper .pd-price-mrp .pd-mrp-strike,
.g1-pd-price-wrapper .pd-price-mrp .pd-mrp-strike .woocommerce-Price-amount,
.g1-pd-price-wrapper .pd-price-mrp .pd-mrp-strike .woocommerce-Price-currencySymbol,
.g1-pd-price-wrapper .pd-price-mrp .pd-mrp-strike bdi {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--ink-muted, #667670) !important;
    display: inline !important;
    text-decoration: line-through !important;
    text-decoration-color: var(--ink-muted, #667670) !important;
}

/* Scoped to single product — larger padding than the archive card version in frontend.css */
.g1-pd-price-wrapper .pd-price-off {
    font-size: 12px;
    font-weight: 700;
    color: var(--save, #D5572B);
    background: var(--save-tint, #FBEAE3);
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.g1-pd-price-wrapper .pd-pack-size,
.pd-pack-size {
    font-size: 13.5px;
    color: var(--ink-muted, #667670);
    margin-bottom: 16px;
}

.g1-pd-price-wrapper .pd-pack-size strong,
.pd-pack-size strong {
    color: var(--ink, #23302D);
    font-weight: 600;
}


/* =========================================
   2. COMPOSITION TAG (.pd-salt-tag)
   ========================================= */

.pd-salt-tag,
a.pd-salt-tag,
a.pd-salt-tag:link,
a.pd-salt-tag:visited,
a.pd-salt-tag:hover,
a.pd-salt-tag:focus,
.pd-salt-tag * {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    margin-bottom: 20px;
    max-width: 100%;
    word-break: break-word;

    background: var(--brand, #0E6B5C) !important;
    color: #ffffff !important;
}


/* =========================================
   3. GENERIC SPOTLIGHT (HONEST PRICING)
   ========================================= */

.cdr-spotlight-alternate-lg {
    background: var(--accent-tint, #FDF3E4);
    border: 2px solid var(--accent, #E0942C);
    border-radius: 13px;
    padding: 28px;
    margin-bottom: 40px;
    box-shadow: 0 6px 20px rgba(224, 148, 44, 0.08);
}

.cdr-spotlight-eyebrow {
    display: inline-block;
    background: var(--accent, #E0942C);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.cdr-spotlight-header-lg h2,
.cdr-spotlight-header-lg h3 {
    font-family: var(--font-display, 'Fraunces', Georgia, serif);
    font-size: 24px;
    font-weight: 600;
    color: #8A5A16;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.25;
    margin: 4px 0 6px 0;
}

.cdr-shortcode-wrapper .cdr-spotlight-header-lg h2 .cdr-savings-amount,
.cdr-shortcode-wrapper .cdr-spotlight-header-lg h3 .cdr-savings-amount,
.cdr-spotlight-header-lg .cdr-savings-amount {
    color: var(--brand, #0E6B5C);
    font-weight: 700;
    font-size: 1.1em;
}

.cdr-spotlight-header-lg p {
    font-size: 14px;
    color: #9C6A1F;
    margin: 0 0 16px 0;
}

.cdr-alternate-card-lg {
    background: var(--surface, #FFFFFF);
    border: 1.5px solid #F0D9AE;
    border-radius: 13px;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    min-height: 120px;
}

/* Image panel: bleeds flush to card edge, fills full card height */
.cdr-alt-thumb-lg {
    width: 180px;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cdr-alt-thumb-lg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 8px 0px;
    padding: 0;
    display: block;
}

/* Info: owns its own 20px padding — completely isolated from image */
.cdr-alt-info-lg {
    flex: 1;
    min-width: 160px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1.5px solid #F0D9AE;
}

.cdr-alt-info-lg h3 {
    font-family: var(--font-display, 'Fraunces', Georgia, serif);
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 6px 0;
}

.cdr-alt-info-lg h3 a {
    color: var(--ink, #23302D);
    text-decoration: none;
}

.cdr-alt-info-lg .cdr-alt-salt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--brand, #0E6B5C);
    color: #ffffff;
    margin-bottom: 8px;
    width: fit-content;
}

.cdr-alt-info-lg .cdr-alt-meta-line {
    font-size: 13.5px;
    color: var(--ink-muted, #667670);
    line-height: 1.5;
    margin: 0;
}

/* Action box: its own padding, subtle left separator via info's border-right */
.cdr-alt-action-box {
    text-align: right;
    background: var(--paper, #FAF8F4);
    padding: 20px 24px;
    min-width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── Comparison Price Box Styling ── */

.cdr-cmp-item.cdr-cmp-main {
    font-size: 13px !important;
    color: var(--ink-muted, #667670) !important;
    margin-bottom: 6px !important;
}

.cdr-cmp-item.cdr-cmp-main .cdr-cmp-val,
.cdr-cmp-item.cdr-cmp-main .cdr-cmp-val .woocommerce-Price-amount,
.cdr-cmp-item.cdr-cmp-main .cdr-cmp-val .woocommerce-Price-currencySymbol,
.cdr-cmp-item.cdr-cmp-main .cdr-cmp-val bdi {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--ink-muted, #667670) !important;
    display: inline !important;
}

.cdr-cmp-item.cdr-cmp-main .cdr-cmp-val s,
.cdr-cmp-item.cdr-cmp-main .cdr-cmp-val del {
    text-decoration: line-through !important;
}

.cdr-cmp-item.cdr-cmp-alt {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--brand, #0E6B5C) !important;
    padding-top: 8px !important;
    margin-bottom: 14px !important;
    border-top: 1px dashed var(--line, #E5E0D6) !important;
}

.cdr-cmp-item.cdr-cmp-alt .cdr-cmp-val,
.cdr-cmp-item.cdr-cmp-alt .cdr-cmp-val .woocommerce-Price-amount,
.cdr-cmp-item.cdr-cmp-alt .cdr-cmp-val .woocommerce-Price-currencySymbol,
.cdr-cmp-item.cdr-cmp-alt .cdr-cmp-val bdi {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--brand, #0E6B5C) !important;
    white-space: nowrap !important;
    display: inline !important;
}

.cdr-btn-alt-lg {
    display: block;
    background: var(--brand, #0E6B5C);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
}

.cdr-btn-alt-lg:hover {
    background: var(--brand, #0E6B5C);
    color: #ffffff !important;
    text-decoration: none;
}

.cdr-btn-alt-lg .cdr-btn-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.cdr-btn-alt-lg:hover .cdr-btn-arrow {
    transform: translateX(4px);
}

@media (max-width: 768px) {

    /* Stack the 3-column flex row into a vertical column */
    .cdr-alternate-card-lg {
        flex-direction: column;
    }

    /* Release the fixed 180px width so the image fills the card */
    .cdr-alt-thumb-lg {
        width: 100%;
        max-height: 180px;
        flex-shrink: 1;
    }

    /* Release min-width and swap the right border to a bottom border */
    .cdr-alt-info-lg {
        min-width: unset;
        width: 100%;
        border-right: none;
        border-bottom: 1.5px solid #F0D9AE;
    }

    /* Release min-width so the action box doesn't force overflow */
    .cdr-alt-action-box {
        width: 100%;
        min-width: unset;
        text-align: left;
    }

    .cdr-btn-alt-lg {
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


/* =========================================
   4. BUTTONS & UNIFIED ACTION ROW
   ========================================= */

/* ─── Form & Actions Unified Row Layout ──────────────────────────────────── */

.cdr-action-row-container {
    width: 100%;
    margin-bottom: 20px;
}

form.cart,
.woocommerce div.product form.cart {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

/* Quantity input styling inside form.cart */
form.cart .quantity,
.woocommerce div.product form.cart .quantity {
    display: inline-flex;
    align-items: center;
    margin: 0;
    flex-shrink: 0;
}

form.cart .quantity input.qty,
.woocommerce div.product form.cart .quantity input.qty {
    height: 48px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    border: 1px solid var(--line, #E5E0D6);
    padding: 0 8px;
}

/* Add to Cart button layout in flex row */
form.cart .single_add_to_cart_button,
.single_add_to_cart_button,
.woocommerce div.product form.cart .single_add_to_cart_button {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    background: var(--brand, #0E6B5C);
    color: #ffffff;
    font-family: 'Work Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    height: 48px;
    padding: 0 24px;
    border-radius: 8px;
    border: none;
    box-shadow: none;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    margin: 0;
    white-space: nowrap;
}

form.cart .single_add_to_cart_button:hover,
.single_add_to_cart_button:hover,
.woocommerce div.product form.cart .single_add_to_cart_button:hover {
    background: var(--brand-dark, #0A4A40);
    transform: translateY(-1px);
}


/* ─── Add to Cart: "Added!" feedback state ───────────────────────────────── */

.single_add_to_cart_button.cdr-btn-added {
    background: #15803d;
    color: #fff;
    pointer-events: none;
}

/* =========================================
   5. NOTICES & BADGES (Consolidated)
   ========================================= */

/* Stock status display — single product page only */
.cdr-single-stock-notice-wrapper {
    margin: 10px 0;
    width: 100%;
}

.cdr-single-stock-notice-wrapper ::before,
.cdr-single-stock-notice-wrapper ::after,
.cdr-sp-notice::before,
.cdr-sp-notice::after,
.cdr-sp-notice *::before,
.cdr-sp-notice *::after,
p.stock::before,
p.stock::after,
.stock::before,
.stock::after {
    content: none;
    display: none;
}

p.stock.out-of-stock,
div.stock.out-of-stock {
    display: inline-block;
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin: 6px 0;
    line-height: 1.5;
}

p.stock.out-of-stock.cdr-discontinued,
div.stock.cdr-discontinued {
    display: inline-block;
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin: 6px 0;
    line-height: 1.5;
}

/* Base notice container */
.cdr-sp-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 10px 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
    border-left-width: 5px;
    box-sizing: border-box;
}


.cdr-sp-notice > span:first-child {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.cdr-sp-notice .cdr-notice-content {
    flex: 1;
    min-width: 0;
}

.cdr-sp-notice .cdr-notice-content strong {
    font-weight: 600;
    display: inline;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}


/* Specific Notice Types */
.cdr-notice-inj {
    background: #fff5f5;
    border-color: #f5cccc;
    border-left-color: #c9302c;
    color: #a94442;
}

.cdr-notice-oos {
    background: #f8fafc;
    border-color: #cbd5e1;
    border-left-color: #64748b;
    color: #334155;
    font-weight: 500;
}

.cdr-notice-discontinued {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #dc2626;
    color: #991b1b;
    font-weight: 600;
}


/* =========================================
   7. SIZE CHART ACCORDION
   ========================================= */

.cdr-size-chart-accordion {
    border: 1px solid #ebebeb;
    border-radius: 8px;
    background: #ffffff;
    margin-top: 15px;
    overflow: hidden;
    width: 100%;
}

.cdr-size-chart-accordion[open] {
    border-color: #2E7A8C;
}

.cdr-size-chart-summary {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    /* Hide default arrow in Chrome/Firefox */
    outline: none;
    transition: background 0.2s ease;
}

.cdr-size-chart-summary::-webkit-details-marker {
    display: none;
    /* Hide default arrow in Safari */
}

.cdr-size-chart-summary::after {
    content: "▼";
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
}

.cdr-size-chart-accordion[open] .cdr-size-chart-summary::after {
    transform: rotate(180deg);
}

.cdr-size-chart-accordion[open] .cdr-size-chart-summary {
    background: #f0f7f9;
    color: #2E7A8C;
    border-bottom: 1px solid #ebebeb;
}

.cdr-size-chart-content {
    padding: 16px;
}

/* Size table inside the accordion */
.cdr-size-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

.cdr-size-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
}

.cdr-size-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.cdr-size-note {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}