/* =============================================================================
   Advertica Kids Gift Campaign — Frontend Styles
   ============================================================================= */

/* Backdrop */
.akg-backdrop {
    position: fixed;
    z-index: 9998;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
}

/* Modal base */
.akg-modal {
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    max-width: 680px;
    width: 94%;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.akg-modal-img img {
    width: 100%;
    display: block;
    max-height: 340px;
    object-fit: cover;
}

.akg-modal-body {
    padding: 28px 32px 32px;
    text-align: center;
}

.akg-modal-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.akg-gift-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

/* Close button */
.akg-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    z-index: 1;
}

.akg-close:hover {
    color: #000;
}

/* Primary button */
.akg-btn-primary {
    display: inline-block;
    background: #111;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.2s;
}

.akg-btn-primary:hover {
    background: #333;
    color: #fff;
}

/* =============================================================================
   Checkout Gift Selector
   ============================================================================= */

.akg-gift-selector {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 16px 0;
    background: #fafafa;
}

.akg-gift-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: #222;
}

.akg-gift-subtitle {
    margin: 0 0 20px;
    font-size: 13px;
    color: #666;
}

/* Individual gift row */
.akg-gift-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid #eee;
}

.akg-gift-row:first-of-type {
    border-top: none;
}

.akg-gift-row-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.akg-gift-cart-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.akg-gift-row-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.akg-field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.akg-required {
    color: #c0392b;
}

/* Product dropdown with thumbnail */
.akg-product-select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.akg-product-select-wrap .select2-container {
    flex: 1 !important;
    min-width: 0;
}

/* Fallback native select */
.akg-product-select-wrap select.akg-product-select {
    flex: 1;
    min-width: 0;
}

.akg-selected-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.akg-size-select {
    width: 100%;
    max-width: 200px;
}

/* Select2 option with thumbnail */
.akg-s2-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.akg-s2-option img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media ( max-width: 768px ) {
    .akg-modal-body {
        padding: 20px 18px 24px;
    }

    .akg-gift-selector {
        padding: 16px;
    }

    .akg-product-select-wrap {
        flex-wrap: wrap;
    }

    .akg-product-select-wrap .select2-container,
    .akg-product-select-wrap select.akg-product-select {
        width: 100% !important;
    }

    .akg-selected-thumb {
        width: 36px;
        height: 36px;
    }

    .akg-size-select {
        max-width: 100%;
    }
}

@media ( max-width: 480px ) {
    .akg-gift-row-label {
        font-size: 13px;
    }

    .akg-gift-cart-thumb {
        width: 40px;
        height: 40px;
    }
}
