.tepp-cc-customise {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 8px 10px !important;
    margin-top: auto !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

.tepp-cc-customise-icon {
    width: 14px !important;
    height: 14px !important;
    background-color: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ea5363 !important;
    opacity: 1 !important;
    transform: none !important;
    position: static !important;
}
.tepp-cc-customise-icon svg {
    width: 100%;
    height: 100%;
}

.tepp-cc-customise-icon svg {
    width: 16px !important;
    height: 16px !important;
    color: #ea5363 !important;
}

.tepp-cc-customise-text {
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    text-transform: uppercase !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    position: static !important;
}

.tepp-cc-print-text {
    color: #ea5363 !important;
}

/* TEP Category Layout CSS - Modern Mockup Translation */
.tepp-cat-card {
    list-style: none !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.tepp-cc-inner {
    background-color: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    align-self: stretch !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    transition: all 0.2s ease-in-out;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tepp-cat-card:hover .tepp-cc-inner {
    /* transform: translateY(-4px); removed for stability */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.tepp-cc-img-wrap {
    position: relative;
    background-color: #f8fafc;
    aspect-ratio: 4/3;
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
    overflow: hidden;
}

.tepp-cc-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.tepp-cc-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    
    transition: transform 0.5s ease;
}

.tepp-cc-inner:hover .tepp-cc-img {
    transform: scale(1.03);
}

.tepp-cc-reviews {
    position: relative;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 1 !important;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.tepp-cc-inner:hover .tepp-cc-reviews {
    opacity: 1;
}

.tepp-cc-reviews-logo img {
    height: 14px;
    width: auto;
}

.tepp-cc-reviews-score {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tepp-cc-stars {
    display: flex;
    color: #fbbf24;
}

.tepp-cc-stars svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.tepp-cc-reviews-count {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.tepp-cc-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    width: 100% !important;
    flex-grow: 1;
}

.tepp-cc-title { font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: color 0.2s;
}

.tepp-cc-title:hover {
    color: #354357;
}

.tepp-cc-price { display: block;
    margin-bottom: 0.75rem;
    color: #64748b; font-size: 15px;
    line-height: 1.4;
}
.tepp-cc-price * {
    display: inline;
}

.tepp-cc-price .woocommerce-Price-amount { font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.tepp-cc-price .woocommerce-price-suffix {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
}

/* Enforce strict grid layout with mathematically perfect gutters and responsive scaling */
ul.products {
    display: grid !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body .archive-products ul.products > li.tepp-cat-card.product-col.product {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-self: stretch !important;
}

/* Base sizing adjustments for better fit */
.tepp-cc-img-wrap {
    padding: 0 !important;
}
.tepp-cc-content { padding: 1rem !important; }
.tepp-cc-title { font-size: 16px !important; }
.tepp-cc-price .woocommerce-Price-amount { font-size: 1.15rem !important; }

/* Ultra Wide Desktop (1400px+) */
@media (min-width: 1400px) {
    ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
    }
}

/* Normal Desktop (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
    }
    .tepp-cc-content {
        padding: 0.875rem !important; /* 14px */
    }
    .tepp-cc-title { font-size: 15px !important; }
}

/* Laptop / Small Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 columns for breathing room */
        gap: 10px !important;
    }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns */
        gap: 10px !important;
    }
}

/* Mobile (under 767px) */
@media (max-width: 767px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .tepp-cc-content {
        padding: 0.65rem !important;
    }
    .tepp-cc-title { font-size: 16px !important; }
    .tepp-cc-price { font-size: 13px !important; }
    .tepp-cc-price .woocommerce-Price-amount {
        font-size: 15px !important; } 
        
    .tepp-cc-customise {
        padding: 8px 10px !important;
    }
    .tepp-cc-customise-text {
        font-size: 9.5px !important;
        letter-spacing: -0.02em !important;
        white-space: nowrap !important;
    }
    .tepp-cc-customise-icon {
        display: none !important;
    }
    
    .tepp-cc-img-wrap { padding: 0 !important; }
    .tepp-cc-reviews {
        padding: 6px !important;
    }
    .tepp-cc-reviews-logo img {
        height: 10px !important;
    }
}

/* Hide layout-breaking elements */
ul.products > .breck-custom { display: none !important; }

/* Absolute Force Squish Fix */
ul.products > li.tepp-cat-card > .tepp-cc-inner { width: 100% !important; min-width: 100% !important; max-width: 100% !important; align-self: stretch !important; flex: 1 1 100% !important; }


/* Sale Price Styling */
.tepp-cc-price:has(del) {
    color: #e11d48; /* Premium bold red/pink for sale */
    font-weight: 700;
}
.tepp-cc-price del {
    color: #94a3b8; /* Muted slate */
    font-weight: 400;
    text-decoration: line-through;
    margin-left: 4px;
    font-size: 0.9em;
}
.tepp-cc-price .woocommerce-price-suffix {
    white-space: nowrap; /* Prevent (Incl. VAT) from breaking */
    color: #64748b !important; /* Keep suffix muted even if price is red */
    font-weight: 500 !important;
}
/* Hide the ugly inline badges injected into the price by the theme */
.tepp-cc-price .labels-2 {
    display: none !important;
}

/* Quick View Button */
.tepp-cc-quickview {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    width: 44px !important;
    height: 44px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #354357 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    opacity: 1 !important;
    transform: none !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
}
@media (min-width: 768px) {
    .tepp-cc-quickview {
        width: 44px;
        height: 44px;
        top: 10px;
        left: 10px;
    }
}
.tepp-cc-quickview svg {
    width: 20px;
    height: 20px;
    transition: color 0.2s;
}
.tepp-cc-quickview:hover {
    background-color: #f1f5f9;
    color: #354357;
    transform: translateY(-2px) !important;
}
@media (max-width: 767px) {
    .tepp-cc-quickview {
        width: 44px !important;
        height: 44px !important;
        top: 10px !important;
        left: 10px !important;
        opacity: 1 !important; /* Always show on mobile */
        transform: none !important;
    }
}
/* =========================================
   SUBCATEGORY CARDS
========================================= */
.tepp-subcat-card {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.tepp-subcat-link {
    display: block;
    text-decoration: none !important;
    height: 100%;
}

.tepp-subcat-inner {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tepp-subcat-link:hover .tepp-subcat-inner {
    /* transform: translateY(-4px); removed for stability */
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.tepp-subcat-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    padding: 20px;
}

.tepp-subcat-link:hover .tepp-subcat-img-wrapper {
    transform: scale(1.03);
}

.tepp-subcat-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px !important;
}

.tepp-subcat-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    padding: 20px 16px;
    background: #ffffff;
}

.tepp-subcat-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3 !important;
    transition: color 0.2s ease;
}

.tepp-subcat-link:hover .tepp-subcat-title {
    color: #354357 !important;
}

.tepp-subcat-count {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.tepp-subcat-arrow { display: none !important; }

.tepp-subcat-arrow svg {
    width: 14px;
    height: 14px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.tepp-subcat-link:hover .tepp-subcat-arrow { display: none !important; }

.tepp-subcat-link:hover .tepp-subcat-arrow svg {
    transform: translateX(4px);
}
/* =========================================
   CUSTOM SUBCATEGORY GRID (7 cols responsive)
========================================= */
.tepp-subcat-grid {
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 576px) {
    .tepp-subcat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 992px) {
    .tepp-subcat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1700px) {
    .tepp-subcat-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Responsive title sizes for different column counts */
.tepp-subcat-title {
    font-size: 16px !important;
}
@media (min-width: 992px) {
    .tepp-subcat-title {
        font-size: 16px !important;
    }
}
@media (min-width: 1700px) {
    .tepp-subcat-title {
        font-size: 19px !important;
    }
}
.tepp-subcat-content {
    padding: 16px 10px;
}
.tepp-subcat-arrow { display: none !important; }
.tepp-subcat-img-wrapper {
    padding: 12px;
}
.tepp-cc-quickview::after { content: ''; position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px; border-radius: 50%; background: transparent; }

/* Categories Section Wrapper */
.tepp-categories-section {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
}

@media (max-width: 767px) {
    .tepp-categories-section {
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 30px;
    }
}

.tepp-subcat-grid {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    gap: 16px !important;
}

@media (max-width: 767px) {
    .tepp-subcat-grid {
        gap: 10px !important;
    }
}
