@charset "UTF-8";
/**
 * Gift Box Frontend Styles
 * Uses checkout's custom dropdown styling via checkout-address.css
 */

/* Gift Box Container */
.dn-gift-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 16px;
    margin: 20px 0;
}

/* Header */
.dn-gift-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 0;
    font-size: 16px;
    /* Request: 16px */
    line-height: 1.2;
    color: #333;
    padding-bottom: 0;
    border-bottom: none;
}

/* Date Notice */
.dn-gift-box__date-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 1px solid #ffca28;
    border-radius: 6px;
    font-size: 13px;
    color: #e65100;
}

.dn-gift-box__date-notice svg {
    flex-shrink: 0;
}

.dn-gift-box__date-notice strong {
    font-weight: 700;
}

.dn-gift-box__icon {
    display: flex;
    align-items: center;
    font-size: inherit;
}

.dn-gift-box__title {
    font-size: inherit;
    font-weight: 400;
    /* Request: Normal weight for text */
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dn-gift-box__value {
    color: #333;
    font-weight: 700;
    /* Request: Bold for price */
    margin-left: 0;
}

/* Gift Items Container */
.dn-gift-box__gifts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Single Gift Item */
.dn-gift-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    transition: none;
}

.dn-gift-item:hover {
    border-color: #eee;
    box-shadow: none;
}

/* Checkbox select */
.dn-gift-item__select {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    align-self: center;
    margin-right: 12px;
    position: relative;
    width: 24px;
    height: 24px;
}

.dn-gift-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    z-index: 1;
    /* Make it clickable if needed, but we use label */
}

/* Custom Checkbox Box */
.dn-gift-checkbox-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background-color: #fff;
    border: 1px solid #c5c5c5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

/* Checkmark Icon */
.dn-gift-checkbox-label::after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Checked State */
.dn-gift-checkbox:checked~.dn-gift-checkbox-label {
    background-color: #105151;
    border-color: #105151;
}

.dn-gift-checkbox:checked~.dn-gift-checkbox-label::after {
    display: block;
}

/* Hover State */
.dn-gift-item:hover .dn-gift-checkbox-label {
    border-color: #105151;
    box-shadow: 0 0 0 2px rgba(16, 81, 81, 0.1);
}

/* Image 3:4 Aspect Ratio */
.dn-gift-item__image {
    position: relative;
    width: 60px;
    /* Reduced width */
    height: 80px;
    /* 3:4 ratio matches 60x80 */
    flex-shrink: 0;
}

.dn-gift-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.dn-gift-item__badge {
    position: absolute;
    top: -6px;
    left: -6px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.dn-gift-item__badge.dn-out-of-stock {
    background: linear-gradient(135deg, #888, #666);
}

/* Info */
.dn-gift-item__info {
    flex: 1;
    min-width: 0;
}

.dn-gift-item__name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Variants Container - Layout for gift item */
.dn-gift-item .dn-cart-item-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

/* Native select styling for gift variants */
/* Set to opacity 0 initially to prevent FOUC (Flash of Unstyled Content) */
/* Custom dropdown JS will replace this visual */
.dn-gift-item .dn-variant-select {
    opacity: 0;
    position: absolute;
    /* Take out of flow to prevent spacing issues */
    pointer-events: none;
    z-index: -1;

    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    min-width: 100px;
    margin-right: 5px;
}

/* No hover/focus styles needed as it is hidden */

/* Hide native select ONLY when custom dropdown is successfully built */
/* This is redundant if opacity is already 0, but kept for logic structure */
.dn-gift-item .dn-variant-select.dn-select-hidden {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    pointer-events: none !important;
    display: inline-block !important;
    /* Keep in DOM */
}

/* Custom dropdown styling (inherits from checkout-address.css) */

/* Price */
.dn-gift-item__price {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.dn-gift-item__price-new {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    /* Black */
}

.dn-gift-item__price-old {
    font-size: 14px;
    color: #333;
    /* Black */
    font-weight: 400;
    /* Lighter weight */
    text-decoration: line-through;
}

/* Cart Gift Label - Used in cart and checkout */
.dn-gift-badge,
.dn-cart-gift-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #4caf50, #43a047);
    color: #fff !important;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
    margin-right: 4px;
    text-decoration: none !important;
    line-height: 1;
    text-transform: none !important;
    letter-spacing: normal !important;
    flex-shrink: 0;
}

.dn-gift-badge svg,
.dn-cart-gift-label svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    flex-shrink: 0;
}

/* Order Value Gift Badge - Pink variant for "Giá trị đơn" promo */
.dn-gift-badge--order-value,
.dn-cart-gift-label--order-value {
    background: #fce4ec;
    color: #c2185b !important;
    border: 1px solid #f8bbd0;
}

.dn-gift-badge--order-value svg,
.dn-cart-gift-label--order-value svg {
    stroke: #c2185b;
}

/* Blocksy Popup Attribute Alignment Fix */
#ct-added-to-cart-popup .ct-product-attributes,
.ct-added-to-cart-modal .ct-product-attributes,
ul.ct-product-attributes {
    margin-top: 4px !important;
    padding-top: 0 !important;
    border-top: none !important;
}

#ct-added-to-cart-popup .ct-product-attributes li,
.ct-added-to-cart-modal .ct-product-attributes li,
ul.ct-product-attributes li {
    display: flex !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    width: auto !important;
}

#ct-added-to-cart-popup .ct-product-attributes li span,
.ct-added-to-cart-modal .ct-product-attributes li span,
ul.ct-product-attributes li span {
    margin-left: 0 !important;
    float: none !important;
}

/* Gift Quantity (disabled) */
.dn-gift-qty {
    display: inline-block;
    width: 40px;
    text-align: center;
    padding: 6px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
}

/* Order/Email gift styling */
.dn-order-gift-item {
    background: #f8fff8;
    border-left: 3px solid #4caf50;
}

.dn-order-gift-badge {
    display: inline-block;
    background: #4caf50;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Checkout order review */
.woocommerce-checkout-review-order-table .dn-cart-gift-label {
    display: block;
    margin-bottom: 4px;
    width: fit-content;
}

/* Thank you page */
.woocommerce-order-details .dn-order-gift-badge {
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 480px) {
    .dn-gift-item {
        flex-wrap: wrap;
    }

    .dn-gift-item__select {
        order: -1;
        padding-top: 0;
    }

    .dn-gift-item__image {
        width: 60px;
        height: 60px;
    }

    .dn-gift-item__info {
        width: calc(100% - 90px);
    }
}

/* Cart Gift Price Strikethrough */
.dn-cart-gift-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dn-gift-price-new {
    font-weight: 600;
    color: #2e7d32;
}

.dn-gift-price-old {
    font-size: 0.9em;
    color: #999;
    text-decoration: line-through;
}

.dn-cart-gift-icon {
    flex-shrink: 0;
    stroke: #fff;
}

/* ================================
   Combo Accordion Styles
   ================================ */

.dn-combo-accordion {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    margin: 15px 0;
}

.dn-combo-accordion__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
    border-radius: 5px 5px 0 0;
    /* Fix corners */
    /* border-bottom moved to content */
    cursor: pointer;
}

/* Complete state - green header */
.dn-combo-accordion--complete .dn-combo-accordion__header {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-bottom: 1px solid #a5d6a7;
}

.dn-combo-accordion--complete .dn-combo-accordion__icon {
    color: #4caf50;
}

.dn-combo-accordion--complete .dn-combo-accordion__title {
    color: #2e7d32;
}

.dn-combo-accordion__icon {
    display: flex;
    align-items: center;
    color: #f57c00;
    flex-shrink: 0;
}

.dn-combo-accordion__title {
    flex: 1;
    font-size: 16px;
    font-weight: 400;
    color: #f57c00;
    /* Orange to match icon/arrow */
    margin: 0;
    /* Align center vertically */
}

.dn-combo-accordion__toggle {
    color: #f57c00;
    font-size: 12px;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
}

.dn-combo-accordion__toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Green arrow when complete */
.dn-combo-accordion--complete .dn-combo-accordion__toggle {
    color: #4caf50;
}

.dn-combo-accordion.collapsed .dn-combo-accordion__toggle {
    transform: rotate(-90deg);
}

.dn-combo-accordion.collapsed .dn-combo-accordion__content {
    display: none;
    border-top: none;
    /* Ensure it hides */
}

.dn-combo-accordion__content {
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    /* Separator moved here */
}

/* Combo Product Row */
.dn-combo-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 10px;
}

.dn-combo-product:last-of-type {
    margin-bottom: 0;
}

.dn-combo-product__image {
    width: 60px;
    height: 80px;
    flex-shrink: 0;
}

.dn-combo-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.dn-combo-product__info {
    flex: 1;
    min-width: 0;
}

.dn-combo-product__name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.3;
}

.dn-combo-product__name a {
    color: #333;
    text-decoration: none;
}

.dn-combo-product__name a:hover {
    color: #2271b1;
}

.dn-combo-product__variants {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

/* Native combo select - HIDE IMMEDIATELY to prevent FOUC */
/* Custom dropdown JS will replace this visual */
.dn-combo-variant {
    opacity: 0;
    position: absolute;
    pointer-events: none;
    z-index: -1;
    /* Fallback styles if JS doesn't load */
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    min-width: 70px;
}

.dn-combo-variant:focus {
    outline: none;
    border-color: #2271b1;
}

/* Hide native select when custom dropdown is used */
.dn-combo-product__variants .dn-variant-select.dn-select-hidden {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    pointer-events: none !important;
}

.dn-combo-product__price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.dn-combo-product__price-old {
    color: #999;
    text-decoration: line-through;
}

.dn-combo-product__price-current,
.dn-combo-product__price-new {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

.dn-combo-product__price-old {
    text-decoration: line-through;
    color: #333;
    font-size: 14px;
    margin-right: 5px;
}

.dn-combo-product__action {
    flex-shrink: 0;
}

.dn-combo-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: #105151;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.dn-combo-add-btn svg {
    width: 14px;
    height: 14px;
}

.dn-combo-add-btn:hover {
    background: #0d4040;
    transform: scale(1.05);
}

.dn-combo-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.dn-combo-add-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Spinner animation for loading state */
.dn-combo-add-btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dn-combo-spin 0.6s linear infinite;
}

@keyframes dn-combo-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Check button for added products */
.dn-combo-check-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #4caf50;
    color: #fff;
    border-radius: 4px;
}

.dn-combo-check-btn svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
}

/* Remove button (X) - shown next to check */
.dn-combo-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    color: #999;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    margin-left: 6px;
}

.dn-combo-remove-btn:hover {
    color: #d32f2f;
    background: #fee;
}

.dn-combo-remove-btn svg {
    stroke: currentColor;
}

/* Added product row - keep same as original styling, just mark as added */
/* .dn-combo-product--added {} */

/* Gift Preview - No background, just text with green gift icon */
.dn-combo-gift-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    margin-top: 12px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 13px;
    color: #333;
}

.dn-combo-gift-preview__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.dn-combo-gift-preview__icon svg {
    width: 20px;
    height: 20px;
    stroke: #4caf50;
}

.dn-combo-gift-preview__text {
    color: #333;
}

.dn-combo-gift-preview__text strong {
    font-weight: 600;
    color: #333;
}

/* Responsive */
@media (max-width: 480px) {
    .dn-combo-product {
        flex-wrap: wrap;
    }

    .dn-combo-product__image {
        width: 50px;
        height: 65px;
    }

    .dn-combo-product__info {
        flex: 1;
        min-width: calc(100% - 130px);
    }

    .dn-combo-product__action {
        width: 100%;
        margin-top: 8px;
    }


    /* ========================================
   CUSTOM DROPDOWN STYLES
   Copied from checkout-address.css to ensure gift box works on product page
   ======================================== */

    /* Wrapper for native select + custom dropdown */
    .dn-select-wrapper {
        position: relative;
        display: inline-block;
    }

    /* Hide native select but keep accessible */
    .dn-select-hidden {
        position: absolute !important;
        opacity: 0 !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }

    /* Custom dropdown container */
    .dn-custom-dropdown {
        position: relative;
        display: inline-block;
        min-width: 80px;
        z-index: 10;
        /* Ensure on top */
    }

    /* Trigger button - looks like native select */
    .dn-dropdown-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 12px;
        background: #fff;
        border: 1px solid #dadada;
        border-radius: 3px;
        font-size: 14px;
        color: inherit;
        cursor: pointer;
        white-space: nowrap;
        min-height: 32px;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
        user-select: none;
    }

    .dn-dropdown-trigger:focus {
        outline: none;
        border-color: #2271b1;
    }

    /* Dropdown text */
    .dn-dropdown-text {
        flex: 1;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Arrow icon */
    .dn-dropdown-arrow {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        color: #666;
        transition: transform 0.2s ease;
    }

    .dn-custom-dropdown.open .dn-dropdown-arrow {
        transform: rotate(180deg);
    }

    /* Options list - hidden by default */
    .dn-dropdown-options {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        min-width: 100%;
        max-height: 200px;
        overflow-y: auto;
        background: #fff;
        border: 1px solid #dadada;
        border-radius: 3px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    }

    .dn-custom-dropdown.open .dn-dropdown-options {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    /* Individual option */
    .dn-dropdown-option {
        padding: 8px 12px;
        font-size: 14px;
        color: #333;
        cursor: pointer;
        transition: background-color 0.1s ease;
        white-space: nowrap;
    }

    .dn-dropdown-option:hover {
        background-color: #f5f5f5;
    }

    /* Selected option */
    .dn-dropdown-option.selected {
        background-color: #f7f7f7;
        color: #333;
        font-weight: 400;
    }

    /* Disabled option */
    .dn-dropdown-option.disabled {
        color: #999;
        cursor: not-allowed;
        background: transparent;
    }

    .dn-dropdown-option.disabled:hover {
        background: transparent;
    }

    /* Scrollbar styling */
    .dn-dropdown-options::-webkit-scrollbar {
        width: 6px;
    }

    .dn-dropdown-options::-webkit-scrollbar-thumb {
        background-color: #ccc;
        border-radius: 3px;
    }

    /* Gift specific adjustments */
    .dn-cart-item-variants .dn-custom-dropdown {
        min-width: auto;
    }

    .dn-cart-item-variants .dn-dropdown-trigger {
        padding: 4px 10px;
        min-height: 28px;
        font-size: 13px;
    }

    .dn-cart-item-variants .dn-dropdown-arrow svg {
        width: 10px;
        height: 5px;
    }
}

/* ========================================
   GIFT & COMBO TITLE LINKS
   Match checkout style (Green + Underline)
   ======================================== */

.dn-gift-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.dn-gift-title-link:hover {
    color: #105151;
    /* Requested Teal color */
    text-decoration: underline;
}

/* Fix Combo Product Title Style */
.dn-combo-product .dn-combo-product__name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.dn-combo-product .dn-combo-product__name a:hover {
    color: #105151;
    /* Requested Teal color */
    text-decoration: underline;
}


/* Reset Price Color to Black */
.dn-gift-item__price,
.dn-gift-item__price-new,
.dn-gift-item__price-old,
.dn-combo-product__price,
.dn-combo-product__price-current,
.dn-combo-product__price-new,
.dn-combo-product__price-old {
    color: #333 !important;
}

/* Custom Stock Alert Toast */
#dn-gift-alert-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
}

.dn-toast-alert {
    background: #fff;
    border-left: 5px solid #f44336;
    /* Red for alert */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    max-width: 350px;
    animation: dnSlideIn 0.5s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes dnSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================================
   MOVED FROM includes/class-gift-frontend.php
   ========================================================== */

/* 2. Bundle List Variation Visibility Fix */
.ct-product-bundles .dn-popup-variation,
.ct-added-to-cart-product .dn-popup-variation {
    display: inline !important;
    font-weight: normal !important;
    font-size: 0.9em !important;
    color: #666 !important;
}

/* Hide it in main attribute list */
.ct-product-attributes .dn-popup-variation,
.woocommerce-mini-cart-item .dn-popup-variation,
dl.variation+.product-title .dn-popup-variation {
    display: none !important;
}

/* 3. Dividers & Spacing */
.ct-popup-quick-cart .ct-product-item,
.blocksy-quick-cart .product-item,
.widget_shopping_cart_content .woocommerce-mini-cart-item,
.widget_shopping_cart_content li.woocommerce-mini-cart-item,
.ct-mini-cart-popup ul.woocommerce-mini-cart>li.woocommerce-mini-cart-item,
.ct-cart-content .ct-cart-item,
.ct-product-bundles li {
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px dashed #e2e2e2 !important;
    position: relative !important;
}

.ct-popup-quick-cart .ct-product-item:last-child,
.woocommerce-mini-cart-item:last-child,
.ct-cart-item:last-child,
.ct-product-bundles li:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 4. Mini-cart Sidebar Attribute Alignment Fix */
.ct-cart-content dl.variation,
.woocommerce-mini-cart-item dl.variation {
    display: none !important;
}

.ct-cart-content dl.variation dt,
.woocommerce-mini-cart-item dl.variation dt {
    display: inline-block !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    font-weight: normal !important;
    min-width: auto !important;
    color: #666 !important;
}

.ct-cart-content dl.variation dt:after,
.woocommerce-mini-cart-item dl.variation dt:after {
    content: "" !important;
    display: none !important;
}

.ct-cart-content dl.variation dd,
.woocommerce-mini-cart-item dl.variation dd {
    display: inline-block !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #111 !important;
    font-weight: 500 !important;
}

.ct-cart-content dl.variation dd p,
.woocommerce-mini-cart-item dl.variation dd p {
    display: inline !important;
    margin: 0 !important;
}

/* 5. Product Title & Image Layout */
.woocommerce-mini-cart-item a.product-title,
.ct-cart-item-title {
    display: block !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin-bottom: 2px !important;
}

/* STRICT GIFT LOCKING via Row Class */
.dn-is-gift-item .quantity,
.dn-is-gift-item .product-quantity {
    pointer-events: none !important;
    opacity: 0.8;
}

.dn-is-gift-item .quantity input,
.dn-is-gift-item .qty {
    background: #f5f5f5 !important;
    border: none !important;
    color: #333 !important;
    font-weight: bold !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

.dn-is-gift-item .quantity .plus,
.dn-is-gift-item .quantity .minus {
    display: none !important;
}

/* 6. Custom Variation & Badge Styles */
.dn-cart-variations {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
    clear: both !important;
}

.dn-cart-variations div {
    margin-bottom: 2px;
}

/* Ensure they are visible in popup headers/lists */
.ct-item-name .dn-cart-gift-label,
.ct-item-name .dn-cart-variations,
.product-name .dn-cart-gift-label,
.product-name .dn-cart-variations {
    display: inline-block;
}

/* LIVE DEBUG FIX: Force Wrapping in Blocksy Popup */
.ct-added-to-cart-popup ul li,
.ct-cart-content ul li {
    flex-wrap: wrap !important;
}

/* Thank You Page Gift Notice */
.dn-thankyou-gift-notice {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    text-align: center;
}

.dn-thankyou-gift-notice .dn-gift-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.dn-thankyou-gift-notice .dn-gift-title {
    font-size: 15px;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 4px;
}

.dn-thankyou-gift-notice .dn-gift-list {
    font-size: 14px;
    color: #388e3c;
}

/* JS Dynamic Elements */
.dn-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    margin-right: 15px;
    text-align: left;
}

.dn-gift-marker {
    margin-bottom: 4px;
}

/* ========================================
   GIFT STOCK ALERT TOAST (Matches Checkout Validation Style)
   ======================================== */
/* ========================================
   GIFT STOCK ALERT TOAST (Matches Checkout Validation Style)
   ======================================== */
.dn-toast-alert {
    position: fixed !important;
    top: 160px !important;
    /* Matched to validation popup */
    left: auto !important;
    right: 30px !important;
    width: auto !important;
    max-width: 450px !important;
    z-index: 99999 !important;
    background: #fff !important;
    border: 1px solid #d32f2f !important;
    /* Red border */
    border-left: 5px solid #d32f2f !important;
    /* Thicker left border like typical toasts */
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
    padding: 15px 40px 15px 20px !important;
    /* Right padding for close btn */
    color: #333 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    animation: dn-slideDown 0.3s ease !important;
}

.dn-toast-message {
    display: block !important;
    width: 100% !important;
}

/* Close Button */
.dn-toast-close {
    position: absolute !important;
    top: -10px !important;
    left: -10px !important;
    /* Positioned top-left outside like validation popup */
    width: 24px !important;
    height: 24px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    color: #888 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
    z-index: 100000 !important;
}

.dn-toast-close:hover {
    background: #f5f5f5 !important;
    color: #333 !important;
    border-color: #bbb !important;
    background-image: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .dn-toast-alert {
        left: 25px !important;
        right: 15px !important;
        max-width: calc(100% - 50px) !important;
        top: 120px !important;
    }
}

/* Animation */
@keyframes dn-slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dn-fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.dn-toast-alert.dn-hiding {
    animation: dn-fadeOut 0.3s ease forwards !important;
}

/* Responsive */
@media (max-width: 480px) {
    .dn-gift-alert {
        top: auto !important;
        bottom: 20px !important;
        left: 20px !important;
        right: 20px !important;
        max-width: none !important;

        animation: dnSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    }

    .dn-gift-alert.dn-hiding {
        animation: dnSlideDown 0.3s ease-in forwards !important;
    }

    @keyframes dnSlideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes dnSlideDown {
        from {
            transform: translateY(0);
            opacity: 1;
        }

        to {
            transform: translateY(100%);
            opacity: 0;
        }
    }
}