/**
 * Fresh Air - Stitch Design CSS (ISOLATED)
 * High specificity to override Flatsome styles
 * Version: 2.1.0 - Upgraded Description & Related Products Design
 */

/* ===================================
   HIDE DUPLICATE BUTTONS FROM WOOCOMMERCE/FLATSOME
   =================================== */
/* Hide any buttons added by WooCommerce hooks after our custom buttons */
.fresh-single-product .fresh-sp-buttons-stitch .single_add_to_cart_button,
.fresh-single-product .fresh-sp-buttons-stitch .button.alt,
.fresh-single-product .fresh-sp-buttons-stitch button:not(.fresh-sp-btn-stitch),
.fresh-single-product .fresh-sp-buttons-stitch .button:not(.fresh-sp-btn-stitch) {
    display: none !important;
}

/* Only show our custom Stitch buttons */
.fresh-single-product .fresh-sp-buttons-stitch .fresh-sp-btn-stitch {
    display: inline-flex !important;
}

/* ===================================
   RESET FLATSOME CONFLICTS
   =================================== */
.fresh-single-product .fresh-sp-buttons-stitch * {
    box-sizing: border-box;
}

/* ===================================
   CATEGORY TAG
   =================================== */
.fresh-single-product .fresh-sp-category-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #9CA3AF;
    margin-bottom: 0.5rem;
}

/* ===================================
   TITLE - ITALIC & BOLD
   =================================== */
.fresh-single-product .fresh-sp-title-italic {
    font-size: 2rem !important;
    /* 32px */
    font-weight: 900 !important;
    /* font-black */
    font-style: normal !important;
    /* Changed from italic */
    text-transform: uppercase !important;
    letter-spacing: -0.05em !important;
    /* tracking-tighter */
    color: #004A99 !important;
    line-height: 1.1 !important;
    margin: 0.5rem 0 0.75rem !important;
}

/* ===================================
   PRICE DISPLAY
   =================================== */

.fresh-single-product .fresh-sp-price-wrapper .price {
    font-size: 2rem;
    font-weight: 900;
    color: #E30613;
    /* Stitch design: Red */
    line-height: 1;
}

.fresh-single-product .fresh-sp-price-wrapper .price del {
    opacity: 0.5;
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.fresh-single-product .fresh-sp-price-wrapper .price ins {
    text-decoration: none;
}

/* ===================================
   PRODUCT VARIATIONS SELECTOR (100% Clone)
   =================================== */

.fresh-single-product .fresh-sp-variations {
    margin: 1.5rem 0;
    padding: 24px 20px;
    background: #FFFFFF;
    border: 1px solid #F5F5F5;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fresh-single-product .fresh-sp-variations-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #757575;
    margin-bottom: 12px;
}

.fresh-single-product .fresh-sp-variations-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.fresh-single-product .fresh-variation-btn {
    height: 40px !important;
    padding: 0 20px !important;
    background: #FFFFFF !important;
    border: 1px solid #E0E0E0 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #424242 !important;
    text-transform: none !important;
    text-align: center !important;
    line-height: 38px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.fresh-single-product .fresh-variation-btn:hover {
    border-color: #BDBDBD !important;
    background: #FAFAFA !important;
}

.fresh-single-product .fresh-variation-btn.active {
    background: #004A99 !important;
    border-color: #004A99 !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 74, 153, 0.3) !important;
}

.fresh-single-product .fresh-variation-btn.active:hover {
    background: #003875 !important;
    border-color: #003875 !important;
    box-shadow: 0 3px 6px rgba(0, 74, 153, 0.4) !important;
}

/* Mobile Responsive - 2 columns */
@media (max-width: 767px) {
    .fresh-single-product .fresh-sp-variations {
        padding: 16px 12px;
    }

    .fresh-single-product .fresh-sp-variations-label {
        font-size: 10px;
        margin-bottom: 10px;
    }

    .fresh-single-product .fresh-sp-variations-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .fresh-single-product .fresh-variation-btn {
        height: 36px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
        line-height: 34px !important;
        border-radius: 6px !important;
    }
}

/* Tablet - 3 columns */
@media (min-width: 768px) and (max-width: 1024px) {
    .fresh-single-product .fresh-sp-variations-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5625rem;
    }

    .fresh-single-product .fresh-variation-btn {
        padding: 0.65rem 1.125rem;
    }
}

/* ===================================
   TECHNICAL PARAMETERS TABLE
   =================================== */
.fresh-single-product .fresh-sp-tech-params {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    background: #F9FAFB;
    /* Light gray background */
}

.fresh-single-product .tech-params-header {
    background: #F3F4F6;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.fresh-single-product .tech-params-title {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6B7280;
    margin: 0;
}

.fresh-single-product .tech-params-body {
    display: flex;
    flex-direction: column;
}

.fresh-single-product .tech-param-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.875rem 1.5rem;
    /* py-3.5 px-6 */
    border-bottom: 1px solid #F3F4F6;
}

.fresh-single-product .tech-param-row:last-child {
    border-bottom: none;
}

/* Alternating row colors */
.fresh-single-product .tech-param-row.even {
    background: #FAFAFA;
}

.fresh-single-product .tech-param-row.odd {
    background: #fff;
}

.fresh-single-product .tech-param-row .param-label {
    font-size: 14px;
    color: #6B7280;
    font-weight: 400;
}

.fresh-single-product .tech-param-row .param-value {
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #004A99;
    text-transform: uppercase;
}

.fresh-single-product .tech-param-row .value-num {
    font-weight: 700;
    color: #004A99;
}

.fresh-single-product .tech-param-row .value-unit {
    font-size: 0.9em;
    font-weight: 400 !important;
    /* Normal weight - fixes DB bold issue */
    color: #6B7280 !important;
    /* Gray color for units */
    margin-left: 0.25rem;
    text-transform: uppercase;
}

/* ===================================
   STITCH BUTTONS - ISOLATED FROM FLATSOME
   =================================== */
.fresh-single-product .fresh-sp-buttons-stitch {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #F3F4F6;
    border-radius: 8px;
    box-shadow: 0 4px 20px -2px rgba(0, 74, 153, 0.08), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
}


.fresh-single-product .fresh-sp-buttons-primary .fresh-sp-cart-form {
    display: flex;
    gap: 1rem;
    /* Exactly 1rem gap between buttons */
    width: 100%;
}

/* Stitch Button Base - OVERRIDE ALL FLATSOME STYLES */
.fresh-single-product .fresh-sp-btn-stitch {
    flex: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    padding: 0 !important;
    /* Remove Flatsome padding */
    margin: 0 !important;
    /* Remove Flatsome margin */
    line-height: 1 !important;
}

/* Primary Buttons - Height 56px, Border Radius 4px */
.fresh-single-product .fresh-sp-btn-stitch.primary-red,
.fresh-single-product .fresh-sp-btn-stitch.primary-navy {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    font-size: 14px !important;
    border-radius: 4px !important;
    /* EXACTLY 4px, not more */
    color: #fff !important;
}

.fresh-single-product .fresh-sp-btn-stitch.primary-red {
    background: #E30613 !important;
    background-color: #E30613 !important;
}

.fresh-single-product .fresh-sp-btn-stitch.primary-red:hover {
    background: #C40511 !important;
    background-color: #C40511 !important;
}

.fresh-single-product .fresh-sp-btn-stitch.primary-navy {
    background: #004A99 !important;
    background-color: #004A99 !important;
}

.fresh-single-product .fresh-sp-btn-stitch.primary-navy:hover {
    background: #003d7e !important;
    background-color: #003d7e !important;
}

/* Secondary Buttons Row */
.fresh-single-product .fresh-sp-buttons-secondary {
    display: flex;
    gap: 0.75rem;
    /* Exactly 0.75rem gap */
    width: 100%;
}

/* Secondary Buttons - Height 48px, Border Radius 4px */
.fresh-single-product .fresh-sp-btn-stitch.secondary {
    flex: 1;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    /* EXACTLY 4px */
    background: #fff !important;
    background-color: #fff !important;
    border: 1px solid #E5E7EB !important;
    color: #374151 !important;
}

.fresh-single-product .fresh-sp-btn-stitch.secondary:hover {
    background: #F9FAFB !important;
    background-color: #F9FAFB !important;
}

.fresh-single-product .fresh-sp-btn-stitch.secondary i {
    font-size: 18px;
}

/* ===================================
   FEATURE CARDS - STITCH STYLE
   =================================== */
.fresh-single-product .fresh-sp-features-section {
    padding: 3rem 0;
    background: #fff;
}

.fresh-single-product .fresh-feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.fresh-single-product .fresh-feature-card {
    background: #fff;
    border: 1px solid #F3F4F6;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px -2px rgba(0, 74, 153, 0.08), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
}

.fresh-single-product .fresh-feature-card .feature-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #004A99;
}

.fresh-single-product .fresh-feature-card .feature-icon {
    font-size: 30px;
}

.fresh-single-product .fresh-feature-card .feature-title {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.fresh-single-product .fresh-feature-card .feature-text {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   TECHNICAL BANNER - ITALIC TITLE
   =================================== */
.fresh-single-product .fresh-sp-tech-banner {
    padding: 3rem 0;
    background: #004A99;
}

.fresh-single-product .tech-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.fresh-single-product .tech-banner-title {
    font-size: 2rem;
    font-weight: 900;
    font-style: italic !important;
    /* Italic như Stitch */
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: #fff;
    margin: 0 0 0.5rem;
}

.fresh-single-product .tech-banner-subtitle {
    font-size: 14px;
    color: #BFDBFE;
    opacity: 0.8;
    line-height: 1.6;
    margin: 0;
}

.fresh-single-product .tech-banner-btn {
    min-width: 240px;
    padding: 1rem 2rem;
    background: #E30613;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

.fresh-single-product .tech-banner-btn:hover {
    background: #C40511;
    transform: scale(1.02);
    color: #fff;
}

/* ===================================
       DESCRIPTION SECTION - UPGRADED
       =================================== */
.fresh-single-product .fresh-sp-description-section {
    padding: 3rem 0;
    background: #F9FAFB;
}

.fresh-single-product .fresh-sp-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #004A99;
    margin-bottom: 1.5rem;
    text-decoration: none !important;
    /* Remove underline */
}

.fresh-single-product .fresh-sp-section-title .section-icon {
    font-size: 1.75rem;
    color: #E30613;
    display: inline-block;
}

/* Wrapper for description content + floating button */
.fresh-single-product .fresh-sp-description-wrapper {
    position: relative;
}

.fresh-single-product .fresh-sp-description-content {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.5s ease;
    position: relative;
    line-height: 1.8;
    color: #374151;
    font-size: 15px;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 20px -2px rgba(0, 74, 153, 0.08), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
}

.fresh-single-product .fresh-sp-description-content.expanded {
    max-height: 5000px;
}

.fresh-single-product .fresh-sp-description-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fresh-single-product .fresh-sp-description-content.expanded::after {
    opacity: 0;
}

.fresh-single-product .fresh-sp-description-content h2,
.fresh-single-product .fresh-sp-description-content h3 {
    color: #004A99;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.fresh-single-product .fresh-sp-description-content strong {
    color: #004A99;
}

.fresh-single-product .fresh-sp-toggle-btn {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background: #fff;
    border: 2px solid #004A99;
    color: #004A99;
    border-radius: 99px;
    /* Pill shape */
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px -2px rgba(0, 74, 153, 0.25);
    z-index: 10;
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Pulse animation to draw attention */
@keyframes pulse-subtle {

    0%,
    100% {
        box-shadow: 0 4px 16px -2px rgba(0, 74, 153, 0.25);
    }

    50% {
        box-shadow: 0 4px 20px -2px rgba(0, 74, 153, 0.4), 0 0 0 4px rgba(0, 74, 153, 0.1);
    }
}

.fresh-single-product .fresh-sp-toggle-btn:hover {
    background: #004A99;
    color: #fff;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px -2px rgba(0, 74, 153, 0.35);
    animation: none;
    /* Stop pulse on hover */
}

/* When expanded, position normally */
.fresh-single-product .fresh-sp-description-content.expanded~.fresh-sp-toggle-btn {
    position: static;
    transform: none;
    margin: 1.5rem auto 0;
    animation: none;
    display: table;
    /* Ensures margin: auto works for centering */
}

.fresh-single-product .fresh-sp-description-content.expanded~.fresh-sp-toggle-btn:hover {
    transform: translateY(-2px);
}

.fresh-single-product .fresh-sp-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 10px;
    font-weight: 900;
}

.fresh-single-product .fresh-sp-toggle-btn.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* ===================================
       RELATED PRODUCTS - UPGRADED
       =================================== */
.fresh-single-product .fresh-sp-related {
    padding: 3rem 0;
    background: #fff;
}

.fresh-single-product .fresh-sp-related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E5E7EB;
}

.fresh-single-product .fresh-sp-section-subtitle {
    color: #6B7280;
    font-size: 14px;
    margin: 0.5rem 0 0;
}

.fresh-single-product .fresh-sp-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #F3F4F6;
    color: #004A99;
    text-decoration: none !important;
    /* Remove underline */
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.fresh-single-product .fresh-sp-view-all:hover {
    background: #004A99;
    color: #fff;
    transform: translateX(4px);
    text-decoration: none !important;
    /* Remove underline on hover */
}

.fresh-single-product .fresh-sp-view-all .arrow-icon {
    font-size: 14px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.fresh-single-product .fresh-sp-view-all:hover .arrow-icon {
    transform: translateX(4px);
}

.fresh-single-product .fresh-product-grid--related {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
    margin-top: 2rem;
}

.fresh-single-product .fresh-product-grid--related .fresh-product-card {
    width: 100% !important;
    max-width: none !important;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.05);
}

.fresh-single-product .fresh-product-grid--related .fresh-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px -4px rgba(0, 74, 153, 0.15);
    border-color: #004A99;
}

/* ===================================
       RESPONSIVE
       =================================== */
@media (max-width: 992px) {
    .fresh-single-product .fresh-feature-cards {
        grid-template-columns: 1fr;
    }

    .fresh-single-product .tech-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .fresh-single-product .tech-banner-btn {
        width: 100%;
    }

    /* Related products - 3 columns on tablet */
    .fresh-single-product .fresh-product-grid--related {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .fresh-single-product .fresh-sp-title-italic {
        font-size: 1.5rem !important;
        /* 24px on mobile */
        letter-spacing: -0.02em !important;
    }

    .fresh-single-product .fresh-sp-price-wrapper .price {
        font-size: 1.5rem;
    }

    .fresh-single-product .fresh-sp-price-wrapper .price del {
        font-size: 1.125rem;
    }

    .fresh-single-product .tech-param-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.75rem 1rem;
    }

    .fresh-single-product .tech-param-row .param-value {
        text-align: left;
    }

    .fresh-single-product .fresh-sp-buttons-primary .fresh-sp-cart-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .fresh-single-product .fresh-sp-buttons-secondary {
        flex-direction: column;
        gap: 0.75rem;
    }

    .fresh-single-product .tech-banner-title {
        font-size: 1.5rem;
    }

    /* Related products - 2 columns on mobile */
    .fresh-single-product .fresh-product-grid--related {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {

    /* Related products - 2 columns on small mobile */
    .fresh-single-product .fresh-product-grid--related {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
}
}