/* ============================================================
   Mivida B2B — Product Cards & Grid Styles
   Used in: Home landing section + Shop / Archive pages
   ============================================================ */

@import url('https://fonts.cdnfonts.com/css/avenir');

/* ============================================================
   HOME PRODUCTS SECTION
   ============================================================ */

.mv-products-section {
    background: #ffffff;
    padding: 90px 0 80px;
    position: relative;
}

.mv-products-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Section header ── */
.mv-products-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 20px;
}

.mv-products-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #BA9E82;
    margin-bottom: 10px;
}

.mv-products-title {
    font-size: clamp(28px, 3.5vw, 46px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.mv-products-subtitle {
    font-size: 15px;
    color: #BA9E82;
    margin: 0;
    font-style: italic;
    line-height: 1.5;
}

.mv-products-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 2px solid #BA9E82;
    padding-bottom: 3px;
    white-space: nowrap;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.mv-products-view-all:hover { color: #BA9E82; }
.mv-products-view-all svg { transition: transform 0.2s; }
.mv-products-view-all:hover svg { transform: translateX(4px); }

/* ── Product grid ── */
.mv-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */

.mv-product-card {
    background: #ffffff;
    border: 1px solid #ede8e1;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.mv-product-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    transform: translateY(-3px);
}

/* Sale badge */
.mv-prod-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: #e05252;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Image */
.mv-prod-img-wrap {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9f8f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mv-prod-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.4s ease;
    display: block;
}

.mv-product-card:hover .mv-prod-img { transform: scale(1.03); }

/* Body */
.mv-prod-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

/* Categories */
.mv-prod-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mv-prod-cat {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.mv-prod-cat:hover { color: #BA9E82; }
.mv-prod-cat:not(:last-child)::after { content: '·'; margin-left: 6px; color: #ccc; }

/* Short description */
.mv-prod-short-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

/* Name */
.mv-prod-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.mv-prod-name a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: color 0.2s;
}

.mv-prod-name a:hover { color: #BA9E82 !important; }

/* Stars */
.mv-prod-rating {
    display: flex;
    align-items: center;
    gap: 3px;
}

.mv-star {
    width: 13px;
    height: 13px;
    color: #ddd;
}

.mv-star.filled { color: #f5c842; }

.mv-rating-count {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

/* Footer (button + price) */
.mv-prod-footer {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    margin-top: auto !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    border: 1px solid #1a1a1a !important;
}

.mv-prod-btn {
    flex: 1 !important;
    background: #1a1a1a !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 14px !important;
    border-radius: 0 !important;
    border: none !important;
    transition: background 0.2s ease !important;
    transform: none !important;
}

.mv-prod-btn:hover { background: #333 !important; color: #fff !important; transform: none !important; }

.mv-prod-price {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 14px !important;
    border-left: 1px solid #333 !important;
    min-width: 72px !important;
    background: #1a1a1a !important;
    gap: 2px !important;
}

.mv-price-old {
    font-size: 10px;
    color: #888;
    text-decoration: line-through;
    font-weight: 500;
}

.mv-price-old .woocommerce-Price-amount { font-size: 10px; color: #888; }

.mv-price-new {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.mv-price-new .woocommerce-Price-amount { font-size: 14px; color: #ffffff; }

/* ============================================================
   SHOP / ARCHIVE PAGE
   ============================================================ */

.mivida-shop-page .mivida-woo-wrap {
    background: #f9f8f5;
}

.mivida-shop-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 50px 40px 80px;
}

.mv-shop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 20px;
}

.mv-shop-title {
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.mv-shop-result-count {
    font-size: 13px;
    color: #999;
    padding-top: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mv-shop-result-count .woocommerce-result-count { margin: 0; }

/* ── Category filter tabs ── */
.mv-shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

.mv-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #666;
    background: #fff;
    border: 1.5px solid #ede8e1;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Avenir', 'Avenir Next', Arial, sans-serif;
}

.mv-filter-tab:hover {
    border-color: #BA9E82;
    color: #1a1a1a;
}

.mv-filter-tab.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.mv-filter-count {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}

.mv-filter-tab.active .mv-filter-count { background: rgba(255,255,255,0.25); }
.mv-filter-tab:not(.active) .mv-filter-count { background: #f0ebe4; color: #999; }

/* ── Shop grid ── */
.mv-shop-grid {
    min-height: 200px;
    transition: opacity 0.25s ease;
}

.mv-shop-grid.loading {
    opacity: 0.4;
    pointer-events: none;
}

.mv-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #999;
}

/* ── Load more ── */
.mv-shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.mv-load-more {
    padding: 14px 48px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Avenir', 'Avenir Next', Arial, sans-serif;
}

.mv-load-more:hover {
    background: #1a1a1a;
    color: #fff;
}

.mv-load-more:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Loading spinner ── */
.mv-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ede8e1;
    border-top-color: #BA9E82;
    border-radius: 50%;
    animation: mv-spin 0.7s linear infinite;
    margin: 40px auto;
    display: block;
}

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

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

@media (max-width: 1024px) {
    .mv-products-grid,
    .mv-shop-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .mv-products-container,
    .mivida-shop-container { padding-left: 20px; padding-right: 20px; }

    .mv-products-header { flex-direction: column; align-items: flex-start; }

    .mv-products-grid,
    .mv-shop-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

    .mv-shop-header { flex-direction: column; }

    .mv-products-section { padding: 60px 0; }
}

@media (max-width: 480px) {
    .mv-products-grid,
    .mv-shop-grid { grid-template-columns: 1fr; }
}
