/* ============================================
   MATHAIS COLOR SCHEME - PRODUCT CARDS
   Yellow: #FFD700 | Red: #E31837 | Black: #000000
   ============================================ */

.product-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
    background: #FFFFFF;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: #FFD700; /* Mathais Yellow border on hover */
}

.product-img-action-wrap {
    position: relative;
}

/* ── Core change: was 220px, now compact ── */
.product-img {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #FAFAFA;
}

/* The <a> tag sits between .product-img and <img> —
   it must be block + full size or the img has nothing to stretch into */
.product-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ── FAVORITE ICON (Heart) ── */
.favorite-icon {
    position: absolute;
    top: 6px;
    right: 6px;
    color: #FFD700 !important; /* Mathais Yellow */
    background: white;
    border-radius: 50%;
    padding: 4px;
    cursor: pointer;
    border: 1px solid #eee;
    z-index: 5;
    transition: all 0.3s ease;
}

.favorite-icon:hover {
    color: #E31837 !important; /* Mathais Red on hover */
    transform: scale(1.1);
}

/* ── PRODUCT BADGES (HOT, SALE, NEW) ── */
.product-badges {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 5;
}

.product-badges .hot {
    background-color: #E31837 !important; /* Mathais Red */
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
}

.product-badges .sale {
    background-color: #FFD700 !important; /* Mathais Yellow */
    color: #000000 !important;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
}

.product-badges .new {
    background-color: #000000 !important; /* Mathais Black */
    color: #FFD700 !important;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
}

.title-marg {
    font-size: 11px;
    margin-top: 6px !important;
    margin-bottom: 2px !important;
}

.product-category p {
    color: #888;
    text-decoration: none;
    font-weight: 600;
}

.product-title {
    font-size: 12px;
    font-weight: 500;
    height: 28px;
    overflow: hidden;
}

.ellipsis-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    font-size: 11px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.35;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #E31837 !important; /* Mathais Red on hover */
}

/* ── Category icons ───────────────────────────────── */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: #FFF9E6; /* Light yellow background */
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.category-card:hover .category-image {
    border-color: #FFD700 !important; /* Mathais Yellow border on hover */
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-card span {
    margin-top: 8px;
    font-weight: 500;
    color: #000000;
    transition: color 0.3s ease;
}

.category-card:hover span {
    color: #E31837 !important; /* Mathais Red on hover */
}

/* ── Price ────────────────────────────────────────── */
.current-price {
    font-size: 14px;
    font-weight: 700;
    color: #E31837 !important; /* Mathais Red for price */
    margin-top: 2px;
    display: block;
}

.old-price {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

.price-saved {
    font-size: 10px;
    color: #FFD700 !important; /* Mathais Yellow */
    font-weight: 500;
    display: block;
}

/* ── Quantity +/- input ───────────────────────────── */
.quantity-input {
    width: 100%;
}

.quantity-input .qty-vals {
    width: 60%;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 4px;
    margin: 0 -1px;
    height: 32px;
    font-size: 13px;
}

.quantity-input .qty-vals:focus {
    outline: none;
    border-color: #FFD700 !important;
}

.quantity-input .qty-btn {
    width: 20%;
    height: 32px;
    background: #FFF9E6; /* Light yellow background */
    border: 1px solid #ddd;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #000000;
}

.quantity-input .qty-btn:hover {
    background: #FFD700 !important; /* Mathais Yellow on hover */
    border-color: #FFD700;
}

.quantity-input .minus-btn {
    border-radius: 50px 0 0 50px;
}

.quantity-input .plus-btn {
    border-radius: 0 50px 50px 0;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity-input input[type=number] {
    -moz-appearance: textfield;
}

/* ── Add to cart button ───────────────────────────── */
.add-to-cart-btn {
    background: #FFD700 !important; /* Mathais Yellow */
    border: none;
    color: #000000 !important;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    background: #E31837 !important; /* Mathais Red on hover */
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* ── Spacing inside card content ─────────────────── */
.button-info {
    margin-top: 6px !important;
}

/* ── Low stock / out-of-stock text ───────────────── */
.product-content p[style*="color:red"],
.product-content p[style*="color: red"] {
    font-size: 10px;
    margin: 2px 0 0;
    line-height: 1.2;
    color: #E31837 !important; /* Mathais Red for stock warnings */
    font-weight: 500;
}

.in-stock {
    color: #28a745;
    font-size: 10px;
    margin: 2px 0 0;
}

.low-stock {
    color: #FFD700 !important; /* Mathais Yellow */
    font-size: 10px;
    margin: 2px 0 0;
    font-weight: 500;
}

.out-of-stock {
    color: #E31837 !important; /* Mathais Red */
    font-size: 10px;
    margin: 2px 0 0;
    font-weight: 500;
}

/* =============================================
   SLIDER CORE STRUCTURE
   ============================================= */

.product-slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.product-slider-overflow {
    overflow: hidden;
    width: 100%;
}

.product-slider {
    display: flex;
    transition: transform 0.5s ease;
}

.product-slide {
    flex: 0 0 auto;
    width: calc(16.666% - 16px);
    margin-right: 16px;
}

/* =============================================
   OVERLAY NAVIGATION BUTTONS
   ============================================= */

.slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.slider-btn:hover:not(:disabled) {
    background: #FFD700 !important; /* Mathais Yellow */
    border-color: #FFD700;
    color: #000000;
}

.slider-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.slider-overlay-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    padding: 0;
    background: #FFFFFF;
    color: #000000;
}

.slider-overlay-btn:hover:not(:disabled) {
    background: #FFD700 !important; /* Mathais Yellow */
    border-color: #FFD700;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    transform: translateY(-50%) scale(1.08);
    color: #000000;
}

.slider-overlay-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.slider-overlay-prev { left: 0; }
.slider-overlay-next { right: 0; }

.slider-navigation {
    display: flex;
    gap: 10px;
}

.slider-navigation .slider-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1200px) {
    .product-slide { width: calc(20% - 16px); }
}

@media (max-width: 992px) {
    .product-slide { width: calc(25% - 14px); }
    .product-img   { height: 120px; }
}

@media (max-width: 768px) {
    .product-slide          { width: calc(33.333% - 12px); }
    .product-img            { height: 110px; }
    .product-slider-container { padding: 0 20px; }
    .slider-overlay-btn     { width: 32px; height: 32px; min-width: 32px; }
    .product-card           { padding: 8px; border-radius: 8px; }
    .add-to-cart-btn        { font-size: 11px; padding: 5px 6px; }
}

@media (max-width: 576px) {
    .product-slide { width: calc(50% - 10px); }
    .product-img   { height: 100px; }
}

@media (max-width: 400px) {
    .product-slide { width: calc(100% - 10px); }
}

/* ── Section headings responsive ─────────────────── */
@media (max-width: 768px) {
    .products-tab .container h3,
    .products-tab .container .section-title h3,
    .section-padding .container h3 {
        font-size: 16px !important;
        margin-bottom: 8px !important;
        color: #000000 !important;
        border-left: 4px solid #FFD700 !important;
        padding-left: 12px !important;
    }
}

@media (max-width: 576px) {
    .products-tab .container h3,
    .products-tab .container .section-title h3,
    .section-padding .container h3 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }
}

/* ── ADDITIONAL MATHAIS COLOR TOUCHES ── */

/* Rating stars */
.rating-stars i.fa-star,
.rating-stars i.fa-star-half-alt {
    color: #FFD700 !important; /* Mathais Yellow for stars */
}

/* View button */
.view-btn {
    background: transparent;
    border: 1px solid #FFD700;
    color: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #FFD700;
    color: #000000;
}

/* Quick view icon */
.quick-view-icon {
    color: #FFD700;
    transition: color 0.3s ease;
}

.quick-view-icon:hover {
    color: #E31837;
}
