/**
 * WooCommerce Promo Box - Frontend Styles
 * Mobile-first responsive design matching the provided mockup
 */

/* Main Container */
.wc-promo-box {
    max-width: 400px;
    margin: 0 auto 20px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
.wc-features-list{margin-bottom:0px!important;}
/* Size variations */
.wc-promo-box.size-small {
    max-width: 320px;
}

.wc-promo-box.size-medium {
    max-width: 400px;
}

.wc-promo-box.size-large {
    max-width: 500px;
}

/* Header Button Section */
.wc-promo-header {
    background-color: #0891b2;
    /* Default cyan-600 */
    color: #ffffff;
    padding: 14px 16px;
    text-align: center;
    width: 100%;
    border: none;
    cursor: default;
    font-family: inherit;
}

.wc-promo-header-button {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wc-promo-header-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.wc-promo-header-button:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wc-promo-header-button:disabled {
    cursor: default;
}

/* Ripple effect on click */
.wc-promo-header-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.wc-promo-header-button:not(:disabled):active::before {
    width: 300px;
    height: 300px;
}

.wc-promo-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.wc-promo-subtitle {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

/* Contact Section */
.wc-promo-contact {
    padding: 12px 16px;
    text-align: center;
    background: #ffffff;
}

.wc-promo-phone-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    flex-wrap: wrap;
}

.wc-promo-phone-icon {
    font-size: 13px;
}

.wc-promo-phone-number {
    color: #0891b2;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wc-promo-phone-number:hover {
    color: #0e7490;
    text-decoration: underline;
}

/* Form Section */
.wc-promo-form {
    padding: 0 16px 14px;
}

.wc-promo-form-inner {
    display: flex;
    gap: 6px;
    max-width: 100%;
}

.wc-promo-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.wc-promo-input:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.wc-promo-input::placeholder {
    color: #9ca3af;
    font-size: 12px;
}

.wc-promo-button {
    padding: 10px 20px;
    background-color: #0891b2;
    /* Default */
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wc-promo-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wc-promo-button:active {
    transform: translateY(0);
}

/* Benefits Box */
.wc-promo-benefits-box {
    margin: 0 16px 14px;
    padding: 12px;
    background-color: #fef3c7;
    /* Default amber-100 */
    border-radius: 6px;
}

.wc-promo-benefits-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.wc-promo-gift-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.wc-promo-benefits-title {
    font-size: 12px;
    font-weight: 700;
    color: #78350f;
    /* Default amber-900 */
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.wc-promo-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc-promo-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.wc-promo-benefit-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wc-promo-checkmark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background-color: #10b981;
    /* Green-500 */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

.wc-promo-benefit-text {
    flex: 1;
    font-size: 12px;
    color: #78350f;
    /* Default amber-900 */
    line-height: 1.4;
}

/* Loading State */
.wc-promo-button.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.wc-promo-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wc-promo-spin 0.6s linear infinite;
}

@keyframes wc-promo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.wc-promo-success-message {
    padding: 10px 12px;
    background-color: #d1fae5;
    border: 1px solid #10b981;
    border-radius: 6px;
    color: #065f46;
    text-align: center;
    margin: 0 16px 14px;
    font-size: 13px;
    animation: wc-promo-slide-down 0.3s ease;
}

@keyframes wc-promo-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Error Message */
.wc-promo-error-message {
    padding: 10px 12px;
    background-color: #fee2e2;
    border: 1px solid #f87171;
    border-radius: 6px;
    color: #991b1b;
    text-align: center;
    margin: 0 16px 14px;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .wc-promo-box {
        border-radius: 6px;
        max-width: 100%;
    }

    .wc-promo-header {
        padding: 12px 14px;
    }

    .wc-promo-title {
        font-size: 16px;
    }

    .wc-promo-subtitle {
        font-size: 11px;
    }

    .wc-promo-contact {
        padding: 10px 14px;
    }

    .wc-promo-phone-label {
        font-size: 12px;
    }

    .wc-promo-phone-number {
        font-size: 15px;
    }

    .wc-promo-form {
        padding: 0 14px 12px;
    }

    .wc-promo-form-inner {
        flex-direction: column;
        gap: 8px;
    }

    .wc-promo-input {
        padding: 9px 12px;
        font-size: 13px;
    }

    .wc-promo-button {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }

    .wc-promo-benefits-box {
        margin: 0 14px 12px;
        padding: 10px;
    }

    .wc-promo-benefits-title {
        font-size: 11px;
    }

    .wc-promo-benefit-text {
        font-size: 11px;
    }

    .wc-promo-checkmark {
        width: 16px;
        height: 16px;
        font-size: 11px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .wc-promo-title {
        font-size: 17px;
    }

    .wc-promo-subtitle {
        font-size: 12px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .wc-promo-box {
        background: #1f2937;
    }

    .wc-promo-contact {
        background: #1f2937;
    }

    .wc-promo-phone-label {
        color: #d1d5db;
    }

    .wc-promo-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .wc-promo-input::placeholder {
        color: #6b7280;
    }
}

/* Print styles */
@media print {
    .wc-promo-box {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    .wc-promo-form,
    .wc-promo-button {
        display: none;
    }
}

/* Accessibility */
.wc-promo-input:focus-visible,
.wc-promo-button:focus-visible {
    outline: 2px solid #0891b2;
    outline-offset: 2px;
}

/* Animation for page load */
.wc-promo-box {
    animation: wc-promo-fade-in 0.4s ease;
}

@keyframes wc-promo-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Flatsome/UX Builder Compatibility */
.ux-builder-element .wc-promo-box {
    margin: 20px 0;
}

.shop-page-title+.wc-promo-box {
    margin-top: 30px;
}

/* ===============================================
   Product Box After - Info Display 
   =============================================== */

/* Base styles */
.wc-product-info-box {
    margin: 15px 0;
    font-size: 14px;
}

.wc-product-info-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.5;
}

.wc-product-info-item:last-child {
    margin-bottom: 0;
}
.box-text{padding: 5px;}
.wc-product-info-icon {
    font-size: 15px;
    flex-shrink: 0;
    width: 13px;
    text-align: center;
}

.wc-product-info-content {
    flex: 1;
    line-height: 1.5;
    text-align: left;
}

.wc-product-info-label {
    font-weight: 600;
    color: #374151;
}

.wc-product-info-value {
    color: #6b7280;
}

/* ============ Style 1: Default (dashed border) ============ */
.wc-product-info-box.style-default {
    border: 1px dashed #e5e7eb;
    border-radius: 8px;
    padding: 2px;
    background: #fafafa;
}

/* ============ Style 2: Compact (no border) ============ */
.wc-product-info-box.style-compact {
    padding: 10px 0;
    background: transparent;
}

.wc-product-info-box.style-compact .wc-product-info-item {
    font-size: 13px;
    margin-bottom: 6px;
}

/* ============ Style 3: Boxed (each item in box) ============ */
.wc-product-info-box.style-boxed {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wc-product-info-box.style-boxed .wc-product-info-item {
    flex: 1 1 calc(50% - 5px);
    min-width: 140px;
    background: #f3f4f6;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 0;
}

/* ============ Style 4: Icon Circle (như hình mẫu) ============ */
.wc-product-info-box.style-icon-circle {
    padding: 10px 0;
    background: transparent;
}

.wc-product-info-box.style-icon-circle .wc-product-info-item {
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.wc-product-info-box.style-icon-circle .wc-product-info-item:last-child {
    border-bottom: none;
}

.wc-product-info-box.style-icon-circle .wc-product-info-icon {
    width: 16px;
    height: 16px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
    flex-shrink: 0;
}

.wc-product-info-box.style-icon-circle .wc-product-info-content {
    display: block;
    line-height: 1.6;
}

.wc-product-info-box.style-icon-circle .wc-product-info-label {
    color: #6b7280;
    font-weight: 400;
}

.wc-product-info-box.style-icon-circle .wc-product-info-value {
    color: #0891b2;
    font-weight: 500;
    margin-left: 0;
}

/* ============ Style 5: Numbered (số thứ tự) ============ */
.wc-product-info-box.style-numbered {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    padding: 15px;
    counter-reset: info-counter;
}

.wc-product-info-box.style-numbered .wc-product-info-item {
    counter-increment: info-counter;
}

.wc-product-info-box.style-numbered .wc-product-info-icon {
    width: 13px;
    height: 13px;
    background: #3b82f6;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-product-info-box.style-numbered .wc-product-info-icon::before {
    content: counter(info-counter);
}

/* Hide emoji in numbered style, show number instead */
.wc-product-info-box.style-numbered .wc-product-info-icon>* {
    display: none;
}

/* ============ Style 6: Card (shadow effect) ============ */
.wc-product-info-box.style-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.wc-product-info-box.style-card .wc-product-info-item {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.wc-product-info-box.style-card .wc-product-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ============ Style 7: Minimal (text only) ============ */
.wc-product-info-box.style-minimal {
    padding: 5px 0;
}

.wc-product-info-box.style-minimal .wc-product-info-icon {
    display: none;
}

.wc-product-info-box.style-minimal .wc-product-info-item {
    font-size: 13px;
    margin-bottom: 4px;
}

.wc-product-info-box.style-minimal .wc-product-info-label::after {
    content: ':';
}

/* Responsive */
@media (max-width: 480px) {
    .wc-product-info-item {
        font-size: 13px;
    }

    .wc-product-info-icon {
        font-size: 13px;
        width: 13px;
    }

    .wc-product-info-box.style-boxed .wc-product-info-item {
        flex: 1 1 100%;
    }

    .wc-product-info-box.style-icon-circle .wc-product-info-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* ===============================================
   Category List Box
   =============================================== */
.wc-category-list-box {
    margin: 0 0 20px;
    background: transparent;
    padding: 10px 0;
}

.wc-category-list-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    /* Align left by default */
}

.wc-category-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: #ffffff;
    color: #333;
    border-radius: 20px;
    /* Rounded pill shape */
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.wc-category-item:hover {
    background: #f9fafb;
    color: #0891b2;
    border-color: #0891b2;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.wc-category-item.active {
    background: #0891b2;
    color: #ffffff;
    border-color: #0891b2;
    box-shadow: 0 2px 4px rgba(8, 145, 178, 0.2);
}

/* Responsive for mobile - Horizontal Scroll */
@media (max-width: 768px) {
    .wc-category-list-box {
        margin-bottom: 15px;
        padding: 10px 0;
        overflow: hidden;
        /* Hide overflow from container */
    }

    .wc-category-list-scroll {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        /* Space for scrollbar if visible, or touch area */
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-left: 2px;
        /* Visual alignment */
    }

    /* Hide scrollbar but keep functionality */
    .wc-category-list-scroll::-webkit-scrollbar {
        height: 4px;
    }

    .wc-category-list-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .wc-category-list-scroll::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

    .wc-category-item {
        flex: 0 0 auto;
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* ===============================================
   Circle Style - Category with Thumbnails
   =============================================== */
.wc-category-style-circle .wc-category-list-scroll {
    gap: 15px;
}

.wc-category-style-circle .wc-category-item {
    flex-direction: column;
    padding: 10px;
    border-radius: 12px;
    min-width: 80px;
    text-align: center;
    gap: 8px;
}

.wc-category-style-circle .wc-category-thumb {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.wc-category-style-circle .wc-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wc-category-style-circle .wc-category-item:hover .wc-category-thumb {
    border-color: #0891b2;
    transform: scale(1.05);
}

.wc-category-style-circle .wc-category-item.active .wc-category-thumb {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.2);
}

.wc-category-style-circle .wc-category-name {
    font-size: 12px;
    color: #333;
    line-height: 1.3;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wc-category-style-circle .wc-category-item.active .wc-category-name {
    color: #0891b2;
    font-weight: 600;
}

/* Square style - explicitly set for clarity */
.wc-category-style-square .wc-category-item {
    border-radius: 6px;
}

.wc-category-style-square .wc-category-name {
    font-size: inherit;
}

/* Responsive for circle style */
@media (max-width: 768px) {
    .wc-category-style-circle .wc-category-list-scroll {
        gap: 12px;
    }

    .wc-category-style-circle .wc-category-item {
        min-width: 70px;
        padding: 8px;
    }

    .wc-category-style-circle .wc-category-thumb {
        width: 50px;
        height: 50px;
    }

    .wc-category-style-circle .wc-category-name {
        font-size: 11px;
        max-width: 70px;
    }
}

/* ===============================================
   No Scroll Mode - Wrap categories on mobile
   =============================================== */
@media (max-width: 768px) {
    .wc-category-noscroll .wc-category-list-scroll {
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .wc-category-noscroll .wc-category-list-scroll::-webkit-scrollbar {
        display: none;
    }

    .wc-category-noscroll .wc-category-item {
        flex: 0 0 auto;
    }

    /* Circle style + noscroll on mobile */
    .wc-category-noscroll.wc-category-style-circle .wc-category-list-scroll {
        justify-content: center;
    }
}