/* --- ARCHIVE & LOOP OVERRIDES --- */

/** CDR Product Loop Price Container **/
.woocommerce-loop-product__link .price {
    display: flex !important;
    align-items: center;
    justify-content: space-around; /* Spreads MRP, Sale Price, and Tag evenly */
    margin-top: 10px;
    padding: 5px 0;
    width: 100%;
}

/** MRP (Struck through price) **/
.woocommerce-loop-product__link .price del {
    text-decoration: none; /* Remove default to control it on bdi */
    font-size: 0.8em;
}

.woocommerce-loop-product__link .price del .woocommerce-Price-amount bdi {
    text-decoration: line-through !important;
    font-size: 0.85em !important;
    color: #999;
}

/** Sale Price (Current price) **/
.woocommerce-loop-product__link .price ins {
    text-decoration: none; /* Removes underline usually added by themes */
    size: 0.7em !important;
}

.woocommerce-loop-product__link .price ins .woocommerce-Price-amount bdi {
    font-size: 0.9em !important; /* Slightly larger than MRP for prominence */
    font-weight: 700;
    color: #333;
}

/** Discount Tag **/
.cdr-discount-tag {
    background: #d9534f;
    color: white;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.7em;
    display: inline-block;
    white-space: nowrap; /* Prevents "OFF" from dropping to next line */
}

/** Brand Name (Under title) **/
.cdr-product-brand {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
    font-weight: 600;
    line-height: 1.2;
}

/** Out of Stock Button **/
.cdr-out-of-stock-btn {
    display: block;
    padding: 8px 10px;
    background-color: #f5f5f5;
    color: #888 !important;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    pointer-events: none;
}


/* --- EXPLORE PAGES (SALTS & BRANDS) --- */

/** Hero Search Section **/
.cdr-search-hero-section {
    padding: 20px 0 40px 0;
    width: 100%;
}

.cdr-input-relative {
    position: relative;
    width: 100%;
}

#cdr-salt-search, #cdr-brand-search {
    width: 100%;
    padding: 20px 25px 20px 60px;
    font-size: 18px;
    border: 3px solid #eee;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

#cdr-salt-search:focus, #cdr-brand-search:focus {
    border-color: #4c857d;
    outline: none;
    box-shadow: 0 10px 15px -3px rgba(76, 133, 125, 0.1);
}

.cdr-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    opacity: 0.4;
}

/** Grid Items (Salts) **/
.cdr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.cdr-grid-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}

.cdr-grid-item a:hover {
    border-color: #4c857d;
    background: #f0f7f6;
    transform: translateY(-2px);
}

/** Brand Cards (With Images) **/
.cdr-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.cdr-brand-card {
    text-align: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}

.cdr-brand-logo-frame img {
    max-height: 60px;
    width: auto;
    margin-bottom: 10px;
    object-fit: contain;
}