/* Gift Card - Product page overrides */
.single-product .product-type-giftcard .quantity {
    display: none !important;
}

.single-product .product-type-giftcard p.price {
    display: none !important;
}

/* Wrapper captures the add-to-cart button inside our layout */
.ah-gc-form-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    clear: both;
}

.ah-gc-form-wrapper .single_add_to_cart_button {
    width: 100% !important;
    float: none !important;
    margin: 15px 0 0 !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
}

/* ========== Gift Card Form ========== */
.ah-gc-form {
    margin: 0 0 10px;
    padding: 0;
    background: none;
    border: none;
    width: 100%;
    clear: both;
}

.ah-gc-form__title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: inherit;
    opacity: 0.85;
}

/* ========== Amount Buttons ========== */
.ah-gc-amounts {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 18px;
    width: 100%;
}

.ah-gc-amount-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.ah-gc-amount-btn:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.ah-gc-amount-btn--active {
    border-color: #10b981 !important;
    background: #10b981 !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.ah-gc-amount-btn--active:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

/* ========== Custom Amount ========== */
.ah-gc-custom-amount {
    margin-bottom: 16px;
}

.ah-gc-custom-amount label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: inherit;
    opacity: 0.7;
}

/* ========== Shared input styles ========== */
.ah-gc-form input.ah-gc-custom-input,
.ah-gc-form input.ah-gc-custom-input[type="number"],
.ah-gc-form .ah-gc-recipient input,
body .ah-gc-form input.ah-gc-custom-input,
body .ah-gc-form .ah-gc-recipient input {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    background: #fff !important;
    background-color: #fff !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #333 !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s;
}

.ah-gc-form input.ah-gc-custom-input {
    -moz-appearance: textfield !important;
}

.ah-gc-form input.ah-gc-custom-input::-webkit-outer-spin-button,
.ah-gc-form input.ah-gc-custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ah-gc-form input.ah-gc-custom-input:focus,
.ah-gc-form .ah-gc-recipient input:focus {
    border-color: #10b981 !important;
}

.ah-gc-form input.ah-gc-custom-input::placeholder,
.ah-gc-form .ah-gc-recipient input::placeholder {
    color: #999 !important;
    font-weight: 400;
}

.ah-gc-form input.ah-gc-custom-input.ah-gc-input--error {
    border-color: #ef4444 !important;
}

.ah-gc-custom-amount .ah-gc-error-msg {
    display: none;
    margin-top: 4px;
    font-size: 12px;
    color: #ef4444;
}

/* ========== Recipient ========== */
.ah-gc-recipient {
    margin-bottom: 16px;
}

.ah-gc-recipient label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: inherit;
    opacity: 0.7;
}

/* ========== Selected Price ========== */
.ah-gc-selected-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.ah-gc-selected-price strong {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
    .ah-gc-amounts {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .ah-gc-amount-btn {
        min-height: 52px;
        padding: 10px 6px;
        font-size: 15px;
    }

    .ah-gc-custom-amount__input-wrap {
        max-width: 100%;
    }
}
