/* تنسيق الهدية في المتجر */
.product-gift-label {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-gift-label img {
    width: 30px;
    height: 30px;
    margin-right: 5px;
    border-radius: 5px;
    border: none;
}

/* تنسيق بانر الهدية الجديد داخل صفحة المنتج */
.ehabgroup-gift-banner {
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gift-header-badge {
    position: absolute;
    top: -1px;
    left: 20px;
    /* Adjust for RTL/LTR if needed, keeping left based on image preference or CSS direction */
    background-color: #f39c12;
    /* Brand Orange */
    color: #fff;
    padding: 5px 15px;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

[dir="rtl"] .gift-header-badge {
    left: auto;
    right: 20px;
}

.gift-content-wrapper {
    display: flex;
    align-items: center;
    padding-top: 10px;
}

.gift-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    /* Take full width */
}

.gift-thumb-link img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.gift-name-link {
    text-decoration: none;
}

.gift-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: block;
}

.gift-pricing {
    text-align: center;
}

.free-label {
    color: #e74c3c;
    font-weight: bold;
    font-size: 16px;
    margin-left: auto;
    /* LTR: Push to right */
}

[dir="rtl"] .free-label {
    margin-left: 0;
    margin-right: auto;
    /* RTL: Push to left */
}

/* Responsive */
@media (max-width: 480px) {
    .gift-content-wrapper {
        flex-direction: row;
        /* Keep row on mobile */
        align-items: center;
    }

    .gift-item-info {
        flex-wrap: wrap;
        /* allow wrapping if name is very long but try to keep inline */
    }
}

/* Ticket Shape Gift Label - Updated */
/* Gift Label - Horizontal Tag Style */
.product-gift-label-ticket {
    position: absolute;
    top: 16px !important;
    left: 10px !important;
    z-index: 10 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px 0 20px !important;
    /* Extra padding on left for the tip */
    font-size: 13px !important;
    font-weight: bold !important;
    color: #333 !important;
    /* Dark Text */
    background: #f4c629 !important;
    /* Yellow Background */
    border-radius: 4px 0 0 4px !important;
    /* Rounded on right (inner side), flat/pointed on left */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1) !important;
    white-space: nowrap !important;
    border: none !important;
}

/* The Triangle Tip (Pointing Left) */
.product-gift-label-ticket::before {
    content: '';
    position: absolute;
    top: 0;
    left: -15px;
    /* Adjust based on triangle size */
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid #f4c629;
    /* Matches background */
}

/* The Hole */
.product-gift-label-ticket::after {
    content: '';
    position: absolute;
    left: -2px;
    /* Position inside the triangle/edge */
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* RTL Adjustment: Point Right */
[dir="rtl"] .product-gift-label-ticket {
    left: auto !important;
    right: 10px !important;
    padding: 0 20px 0 10px !important;
    /* Switch padding */
    border-radius: 0 4px 4px 0 !important;
}

[dir="rtl"] .product-gift-label-ticket::before {
    left: auto;
    right: -14px;
    border-right: none;
    border-left: 15px solid #f4c629;
}

[dir="rtl"] .product-gift-label-ticket::after {
    left: auto;
    right: -2px;
}

.gift-ticket-text {
    position: relative;
    z-index: 2;
}