/*
 * ms-gift-selector.css  v2
 * Free Gift Selector — Siân Brand Design System
 * Target layout: image left, all text+dropdown stacked right, radio dot far left
 */

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;500&family=League+Spartan:wght@300;400&display=swap');

/* ═══════════════════════════════════════════════════
   OUTER WRAPPER
═══════════════════════════════════════════════════ */
.ms-gift-selector {
    width: 100%;
    margin: 20px 0;
    padding: 28px 20px 20px;
    background: #EDE6E2;
    border: none;
    border-radius: 0px;
    font-family: 'Josefin Sans', sans-serif;
    color: #291C1C;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════ */
.ms-gift-header {
    text-align: center;
    margin-bottom: 18px;
}

.ms-gift-eyebrow {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #291C1C;
    line-height: 1.2;
    margin: 0 0 5px;
}

.ms-gift-title {
    font-family: 'Optima', 'Optima Nova', 'URW Classico', Georgia, serif;
    font-weight: 400;
    font-size: 32px;
    color: #291C1C;
    line-height: 1.15;
    margin: 0 0 5px;
    display: block;
}

.ms-gift-subtitle {
    font-family: 'League Spartan', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: #291C1C;
    opacity: 0.75;
    line-height: 1.5;
    margin: 0;
    display: block;
}

/* ═══════════════════════════════════════════════════
   CARDS LIST
═══════════════════════════════════════════════════ */
.ms-gift-options {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

/* ═══════════════════════════════════════════════════
   EACH CARD OPTION
═══════════════════════════════════════════════════ */
.ms-gift-option {
    display: block;
    position: relative;
}

/* Hide native radio input completely */
.ms-gift-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/*
 * THE KEY FIX:
 * align-items: flex-start so the image column and info column
 * both start at top — the info column grows downward with dropdown inside it.
 */
.ms-gift-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    padding: 16px;
    background: #F7F3F1;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

/*.ms-gift-option:first-child .ms-gift-card {
    border-top: 1px solid #E1D6D0;
    border-radius: 4px 4px 0 0;
}
.ms-gift-option:last-child .ms-gift-card {
    border-radius: 0 0 4px 4px;
}
.ms-gift-option:only-child .ms-gift-card {
    border-top: 1px solid #E1D6D0;
    border-radius: 4px;
}
.ms-gift-option + .ms-gift-option .ms-gift-card {
    margin-top: -1px;
}*/

.ms-gift-option input:checked + .ms-gift-card {
    border-color: #291C1C;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════
   RADIO DOT  (leftmost column)
═══════════════════════════════════════════════════ */
.ms-gift-radio-dot {
    flex-shrink: 0;
    margin-top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #B8A8A4;
    background: #fff;
    position: relative;
    transition: all .3s ease;
    display: none;
}

.ms-gift-option input:checked + .ms-gift-card .ms-gift-radio-dot {
    border-color: #291C1C;
    background: #291C1C;
}

.ms-gift-radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #F7F3F1;
    opacity: 0;
}
.ms-gift-option input:checked + .ms-gift-card .ms-gift-radio-dot::after {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════
   PRODUCT IMAGE  (second column, fixed width)
═══════════════════════════════════════════════════ */
.ms-gift-img,
.ms-gift-cat-img {
    flex-shrink: 0;
    width: 80px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ms-gift-img img,
.ms-gift-cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-gift-cat-placeholder {
    width: 70px;
    height: 90px;
    background: #E1D6D0;
    border-radius: 2px;
    display: block;
}

/* ═══════════════════════════════════════════════════
   INFO COLUMN  (third column — flex: 1, all text + dropdown)
   This MUST be display:flex + flex-direction:column
   so the dropdown renders BELOW the title/labels, not beside them
═══════════════════════════════════════════════════ */
.ms-gift-info {
    flex: 1;
    text-align: left;
}

/* Product name */
.ms-gift-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #291C1C;
    line-height: 1.35;
    margin-bottom: 10px;
    word-break: break-word;
    display: block;
}

/* Strikethrough price */
.ms-gift-price {
    font-family: 'League Spartan', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #291C1C;
    line-height: 1.2;
    margin-bottom: 0;
}
.ms-gift-price s,
.ms-gift-price del,
.ms-gift-price .woocommerce-Price-amount {
    font-family: 'League Spartan', sans-serif;
    font-size: 12px;
    color: #291C1C;
    opacity: 0.65;
    text-decoration: line-through;
}
/* suppress the WC price HTML wrapper from adding colour */
.ms-gift-price ins {
    text-decoration: none;
}
/* Hide old green FREE text */
.ms-gift-price strong {
    display: none !important;
}

/* INCLUDED label */
.ms-gift-included {
    font-family: 'League Spartan', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #291C1C;
    opacity: 0.65;
    line-height: 1.2;
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════
   DROPDOWNS  — children of .ms-gift-info, render below labels
═══════════════════════════════════════════════════ */
.ms-cat-product-select,
.ms-cat-variant-select,
.ms-gift-variant-wrap select {
    display: block;
    width: 100%;
    padding: 8px 30px 5px 10px;
    font-family: 'League Spartan', sans-serif;
    letter-spacing: 0.01em;
    font-size: 14px;
    font-weight: 400;
    color: #291C1C;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23291C1C' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 12px;
    background-position: right 10px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #D4C8C4;
    cursor: pointer;
    line-height: 1.4;
    margin: 0 0 7px;
}

.ms-cat-product-select:hover,
.ms-cat-variant-select:hover {
    border-color: #291C1C;
}

.ms-cat-product-select:focus,
.ms-cat-variant-select:focus {
    outline: none;
    border-color: #291C1C;
}

/* Always look active — never disabled-grey */
.ms-cat-product-select[disabled],
.ms-cat-variant-select[disabled] {
    opacity: 1 !important;
    cursor: pointer !important;
    background-color: #FFFFFF !important;
    color: #291C1C !important;
}

/* ═══════════════════════════════════════════════════
   ADD TO BAG BUTTON  (WC button override)
═══════════════════════════════════════════════════ */
form.cart .single_add_to_cart_button {
    display: block !important;
    width: 100% !important;
    background: #C42F6B;
    color: #FFFFFF !important;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
    height: auto !important;
    padding: 12px 24px;
    border: none !important;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}
form.cart .single_add_to_cart_button:hover {
    background: #a8235a !important;
}

/* ── Footnote ── */
.ms-gift-footnote {
    text-align: center;
    display: block;
    font-family: 'League Spartan', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: #291C1C;
    opacity: 0.75;
    line-height: 1.5;
    margin: 0;
}

/* ═══════════════════════════════════════════════════
   VALIDATION MESSAGES
═══════════════════════════════════════════════════ */
.ms-gift-required-msg,
.ms-gift-product-required-msg,
.ms-gift-variant-required-msg {
    font-family: 'League Spartan', sans-serif;
    font-size: 12px;
    color: #C42F6B;
    margin-top: 8px;
    display: none;
}

/* ═══════════════════════════════════════════════════
   CART BADGE
═══════════════════════════════════════════════════ */
.ms-free-gift-badge {
    display: inline-block;
    background: #291C1C;
    color: #F7F3F1;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
    margin-top: 3px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
.single-product #main > .container { padding-top: 10px; padding-right: 10px; }


}


@media (max-width: 600px) {
.ms-gift-selector { padding: 20px 10px 15px; }
.ms-gift-title { font-size: 24px; }
.ms-gift-card { gap: 10px; padding: 10px; }
.ms-gift-img, .ms-gift-cat-img { width: 55px; height: 70px; }
.ms-gift-cat-placeholder { width: 55px; height: 70px; }
.ms-gift-name { font-size: 14px; }


}