/* ===== VARIABLES ===== */
:root {
    --primary-color: #ee4d2d;
    --primary-hover: #f05d40;
    --border-color: #e5e5e5;
    --text-color: #333;
    --text-muted: #999;
    --white: #fff;
    --success-color: #01a859;
    --error-color: #cb141e;
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--white);
    padding: 16px;
    line-height: 1.5;
    color: var(--text-color);
    font-size: 14px;
}

/* ===== LAYOUT ===== */
.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

/* ===== SECTION HEADINGS ===== */
.Dagtcd {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.variation-required .Dagtcd::after {
    content: " *";
    color: var(--error-color);
    font-size: 12px;
}

/* ===== OPTIONS CONTAINER (2 CỘT) ===== */
#size-options,
.variation-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
}

/* ===== BUTTON STYLES ===== */
.sApkZm,
.variation-option {
    position: relative;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 6px;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.8);
    text-align: center;
    transition: all 0.2s ease;
    width: 100%;
}

.sApkZm:hover,
.variation-option:hover {
    border-color: var(--primary-color);
}

/* Active state */
.sApkZm.T_6srb,
.variation-option.selected {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(238, 77, 45, 0.03);
}

/* Text inside buttons */
.ZivAAW,
.option-name {
    display: block;
    text-align: center;
}

/* Checkmark badges */
.NkXHv4,
.selected-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.sApkZm.T_6srb .NkXHv4,
.variation-option.selected .selected-badge {
    display: flex;
}

.NkXHv4::before,
.selected-badge::before {
    content: "✓";
    color: var(--white);
    font-size: 10px;
    font-weight: bold;
}

.QX2JQy {
    width: 10px;
    height: 10px;
}

/* ===== ERROR MESSAGES ===== */
.error-message {
    display: none;
    font-size: 11px;
    color: var(--error-color);
    margin-top: 4px;
}

.error-message.show {
    display: block;
}

/* ===== PRICE DISPLAY ===== */
.price-display-section {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.price-info .label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.price-info .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.price-info .value small {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

.price-breakdown {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.price-breakdown-item {
    flex: 1;
    text-align: center;
}

.price-breakdown-item .label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.price-breakdown-item .value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.price-breakdown-item .value.sale {
    color: var(--success-color);
}

/* ===== QUANTITY SECTION ===== */
.quantity-wrapper {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0;
}

.quantity.buttons_added {
    display: flex;
    align-items: center;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.quantity .minus,
.quantity .plus {
    width: 44px;
    height: 44px;
    border: none;
    background: #f5f5f5;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    transition: all 0.2s ease;
}

.quantity .minus:hover:not(:disabled),
.quantity .plus:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
}

.quantity .minus:disabled,
.quantity .plus:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#quantity_62acbb3aab6dd {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 500;
    background: var(--white);
    margin: 0;
    padding: 0;
    -moz-appearance: textfield;
}

#quantity_62acbb3aab6dd:disabled {
    background: #f5f5f5;
}

/* Remove number input arrows */
#quantity_62acbb3aab6dd::-webkit-outer-spin-button,
#quantity_62acbb3aab6dd::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== DISABLED STATE ===== */
.quantity-disabled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.quantity-tooltip {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    display: none;
    z-index: 10;
    pointer-events: none;
}

.quantity-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
}

.quantity-disabled:hover .quantity-tooltip {
    display: block;
}

/* ===== CART ACTIONS ===== */
.cart-actions-wrapper {
    margin: 16px 0 8px;
}

.cart-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
}

.cart-row:last-child {
    margin-bottom: 0;
}

.add-to-cart-wrapper {
    flex: 1;
    min-width: 0;
}

.buy-now-wrapper {
    width: 100%;
}

.single_add_to_cart_button {
    height: 44px;
    width: 100%;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single_add_to_cart_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#add-to-cart-btn {
    background-color: #ff6b6b;
    color: var(--white);
    border: 1px solid #ff5252;
}

#add-to-cart-btn:hover:not(:disabled) {
    background-color: #ff5252;
}

#buy-now-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid #d73211;
}

#buy-now-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

/* ===== HIDDEN INPUTS ===== */
.hidden-inputs {
    display: none;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .Dagtcd {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .sApkZm,
    .variation-option {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .NkXHv4,
    .selected-badge {
        width: 14px;
        height: 14px;
    }
    
    .NkXHv4::before,
    .selected-badge::before {
        font-size: 8px;
    }
    
    .quantity.buttons_added {
        height: 40px;
    }
    
    .quantity .minus,
    .quantity .plus {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    #quantity_62acbb3aab6dd {
        width: 55px;
        height: 40px;
        font-size: 14px;
    }
    
    .single_add_to_cart_button {
        height: 40px;
        font-size: 13px;
    }
    
    .price-info .value {
        font-size: 18px;
    }
    
    .cart-row {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        font-size: 12px;
    }
    
    .Dagtcd {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .sApkZm,
    .variation-option {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    #size-options,
    .variation-options {
        gap: 8px;
    }
    
    .quantity.buttons_added {
        height: 38px;
    }
    
    .quantity .minus,
    .quantity .plus {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    
    #quantity_62acbb3aab6dd {
        width: 50px;
        height: 38px;
        font-size: 13px;
    }
    
    .single_add_to_cart_button {
        height: 38px;
        font-size: 12px;
        padding: 0 10px;
    }
    
    .price-display-section {
        padding: 8px;
        margin: 8px 0;
    }
    
    .price-info .label {
        font-size: 12px;
    }
    
    .price-info .value {
        font-size: 16px;
    }
    
    .price-breakdown {
        gap: 8px;
    }
    
    .price-breakdown-item .label {
        font-size: 9px;
    }
    
    .price-breakdown-item .value {
        font-size: 11px;
    }
    
    .cart-row {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    body {
        padding: 8px;
    }
    
    .sApkZm,
    .variation-option {
        padding: 5px 6px;
        font-size: 10px;
    }
    
    .quantity.buttons_added {
        height: 36px;
    }
    
    .quantity .minus,
    .quantity .plus {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    #quantity_62acbb3aab6dd {
        width: 45px;
        height: 36px;
        font-size: 12px;
    }
    
    .single_add_to_cart_button {
        height: 36px;
        font-size: 11px;
        padding: 0 8px;
    }
    
    #size-options,
    .variation-options {
        gap: 6px;
    }
    
    .cart-row {
        gap: 6px;
    }
}