/* ==========================================================================
   BMV.LV Custom Styles - Frontend3 (Bootstrap 5)
   ========================================================================== */

/* 1. Fontu imports */
@import url('https://fonts.googleapis.com/css2?family=Imbue:opsz,wght@10..100,100..900&display=swap');
/* 2. Krāsu mainīgie */
:root {
    --bmv-orange: #fbaf41; 
    --bmv-green: #86a397;  
    --bmv-blue: #0056b3;   
    --bmv-text: rgb(0, 0, 0);
}

/* 3. Globālie stili */
body {
    background-color: #f8f9fa;
    color: var(--bmv-text);
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* 4. Header & Logo (Centrēšanas maģija) */
.bmv-bg-orange { background-color: var(--bmv-orange) !important; }
.bmv-bg-green { background-color: var(--bmv-green) !important; }

/* Konteiners, kas satur BMV un Elektroinstrumenti */
.bmv-logo-wrapper {
    display: flex;
    align-items: center; /* Šis noliek abus elementus precīzi vertikālā centrā */
    text-decoration: none;
    line-height: 1;
}

font.logobmv {
    color: black;
    font-family: 'Imbue', serif;
    font-size: 55px;
    font-weight: 800;
    font-variation-settings: 'wdth' 20; 
    letter-spacing: -3px;
    line-height: 1; 
    text-transform: uppercase;
    display: inline-block;
    margin: 0;
}

.logo-subtext {
    font-weight: bold;
    font-size: 15px;
    color: black;
    padding-left: 8px;
    white-space: nowrap;
    line-height: 1;
}

/* 5. Header Meklēšana un Info */
.header-search .form-control {
    background-color: #f1f3f5 !important;
    border: none;
    border-radius: 0;
    font-size: 13px;
}

.header-search .btn {
    background-color: #f1f3f5 !important;
    border: none;
    border-radius: 0;
}

.header-info-block {
    font-size: 12px;
    line-height: 1.2;
}

/* 6. Sidebar (Kategorijas) */
.sidebar-bmv {
    border: 1px solid #dee2e6;
    border-radius: 0;
}

.sidebar-bmv .accordion-button {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 15px;
    cursor: pointer;
    color: var(--bmv-text);
}

.sidebar-bmv .list-group-item.active {
    background-color: #fff !important;
    color: var(--bmv-blue) !important;
    font-weight: bold;
    border-left: 3px solid var(--bmv-orange) !important;
}

/* 7. Produktu Tabula */
.product-table th {
    background-color: #f1f3f5;
    font-size: 13px;
    padding: 12px 10px;
}

.btn-bmv-cart {
    background-color: var(--bmv-orange);
    border: none;
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    padding: 5px 15px;
}

/* --- Ražotāju logo unificēšana --- */

/* 1. Konteiners - fiksēta "kastīte" logotipam */
.manufacturer-logo-wrapper {
    width: 100px;       /* Maksimālais pieejamais platums */
    height: 35px;       /* Fiksēts augstums, lai rindas nebūtu dažādas */
    display: flex;      /* Izmantojam Flexbox centrēšanai */
    align-items: center;    /* Vertikāli pa vidu */
    justify-content: center;/* Horizontāli pa vidu */
    margin: 0 auto;     /* Nocentrē pašu konteineru šūnā */
    /* background: rgba(0,0,0,0.05); /* Atkomentē, lai redzētu kastītes robežas testam */
}

/* 2. Pats attēls */
.manufacturer-logo-img {
    max-width: 100%;    /* Nedrīkst būt platāks par kastīti */
    max-height: 100%;   /* Nedrīkst būt augstāks par kastīti */
    object-fit: contain;/* MAĢIJA: Iekļauj attēlu kastītē, nemainot proporcijas */
    
    /* Pelēkais efekts kā paraugā */
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Kad uzbrauc ar peli uz rindas, logo paliek krāsains */
.product-table tr:hover .manufacturer-logo-img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Konteiners ražotāja logo */
.m-logo-box {
    width: 100px;         /* Maksimālais platums, ko atvēlam logo */
    height: 30px;        /* Fiksēts augstums visiem logo */
    display: flex;
    align-items: center;  /* Vertikālais centrs */
    justify-content: center; /* Horizontālais centrs */
    margin: 0 auto;
}

/* Pats attēls */
.m-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;  /* Saglabā proporcijas, bet neiziet no rāmjiem */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: 0.3s;
}

/* Efekts, kad uzbrauc ar peli uz tabulas rindas */
tr:hover .m-logo-img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ==========================================================================
   BMV.LV Custom Styles - Frontend3 (Bootstrap 5)
   ========================================================================== */

/* 1. Fontu imports */
@import url('https://fonts.googleapis.com/css2?family=Imbue:opsz,wght@10..100,100..900&display=swap');
/* 2. Krāsu mainīgie */
:root {
    --bmv-orange: #fbaf41; 
    --bmv-green: #86a397;  
    --bmv-blue: #0056b3;   
    --bmv-text: rgb(0, 0, 0);
}

/* 3. Globālie stili */
body {
    background-color: #f8f9fa;
    color: var(--bmv-text);
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* 4. Header & Logo (Centrēšanas maģija) */
.bmv-bg-orange { background-color: var(--bmv-orange) !important; }
.bmv-bg-green { background-color: var(--bmv-green) !important; }

/* Konteiners, kas satur BMV un Elektroinstrumenti */
.bmv-logo-wrapper {
    display: flex;
    align-items: center; /* Šis noliek abus elementus precīzi vertikālā centrā */
    text-decoration: none;
    line-height: 1;
}

font.logobmv {
    color: black;
    font-family: 'Imbue', serif;
    font-size: 55px;
    font-weight: 800;
    font-variation-settings: 'wdth' 20; 
    letter-spacing: -3px;
    line-height: 1; 
    text-transform: uppercase;
    display: inline-block;
    margin: 0;
}

.logo-subtext {
    font-weight: bold;
    font-size: 15px;
    color: black;
    padding-left: 8px;
    white-space: nowrap;
    line-height: 1;
}

/* 5. Header Meklēšana un Info */
.header-search .form-control {
    background-color: #f1f3f5 !important;
    border: none;
    border-radius: 0;
    font-size: 13px;
}

.header-search .btn {
    background-color: #f1f3f5 !important;
    border: none;
    border-radius: 0;
}

.header-info-block {
    font-size: 12px;
    line-height: 1.2;
}

/* 6. Sidebar (Kategorijas) */
.sidebar-bmv {
    border: 1px solid #dee2e6;
    border-radius: 0;
}

.sidebar-bmv .accordion-button {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 15px;
    cursor: pointer;
    color: var(--bmv-text);
}

.sidebar-bmv .list-group-item.active {
    background-color: #fff !important;
    color: var(--bmv-blue) !important;
    font-weight: bold;
    border-left: 3px solid var(--bmv-orange) !important;
}

/* 7. Produktu Tabula */
.product-table th {
    background-color: #f1f3f5;
    font-size: 13px;
    padding: 12px 10px;
}

.btn-bmv-cart {
    background-color: var(--bmv-orange);
    border: none;
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    padding: 5px 15px;
}

/* --- Ražotāju logo unificēšana --- */

/* 1. Konteiners - fiksēta "kastīte" logotipam */
.manufacturer-logo-wrapper {
    width: 100px;       /* Maksimālais pieejamais platums */
    height: 35px;       /* Fiksēts augstums, lai rindas nebūtu dažādas */
    display: flex;      /* Izmantojam Flexbox centrēšanai */
    align-items: center;    /* Vertikāli pa vidu */
    justify-content: center;/* Horizontāli pa vidu */
    margin: 0 auto;     /* Nocentrē pašu konteineru šūnā */
    /* background: rgba(0,0,0,0.05); /* Atkomentē, lai redzētu kastītes robežas testam */
}

/* 2. Pats attēls */
.manufacturer-logo-img {
    max-width: 100%;    /* Nedrīkst būt platāks par kastīti */
    max-height: 100%;   /* Nedrīkst būt augstāks par kastīti */
    object-fit: contain;/* MAĢIJA: Iekļauj attēlu kastītē, nemainot proporcijas */
    
    /* Pelēkais efekts kā paraugā */
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Kad uzbrauc ar peli uz rindas, logo paliek krāsains */
.product-table tr:hover .manufacturer-logo-img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Konteiners ražotāja logo */
.m-logo-box {
    width: 100px;         /* Maksimālais platums, ko atvēlam logo */
    height: 30px;        /* Fiksēts augstums visiem logo */
    display: flex;
    align-items: center;  /* Vertikālais centrs */
    justify-content: center; /* Horizontālais centrs */
    margin: 0 auto;
}

/* Pats attēls */
.m-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;  /* Saglabā proporcijas, bet neiziet no rāmjiem */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: 0.3s;
}

/* Efekts, kad uzbrauc ar peli uz tabulas rindas */
tr:hover .m-logo-img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Produkta lapas specifika */
.product-image-container {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-buy-box {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.thumb-link {
    transition: 0.2s;
    opacity: 0.6;
}

.thumb-link:hover, .thumb-link.active {
    opacity: 1;
    border-color: var(--bmv-orange) !important;
}

/* Parametru tabula */
.border-spacing-0 {
    border-collapse: collapse;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

/* Scroll-to efekts (ja izmanto JS) */
#details {
    scroll-margin-top: 20px;
}

/* Promo lapas specifika */
.promo-banner {
    min-height: 120px;
}

/* Izceļam "Akcija" uzlīmi tabulā, ja esam Promo lapā */
.promo-list .product-ribbon {
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

/* Animācija banera ikonai */
.promo-banner .fa-percent {
    position: absolute;
    right: 20px;
    bottom: -10px;
}

/* Groza rāmji un formas */
.checkout-wrapper .card {
    border-radius: 4px;
}

.delivery-item {
    transition: background 0.2s;
}

.delivery-item:hover {
    background-color: #f8f9fa;
    border-color: var(--bmv-orange) !important;
}

.delivery-item input:checked + label {
    font-weight: bold;
}

/* Pogas krāsa no bildes (tāds oranži-sarkans "PIRKT") */
.btn-buy-bmv {
    background: linear-gradient(to bottom, #ff5e14, #e64a00);
    border: none;
    color: #fff;
    box-shadow: 0 4px 0 #b33a00;
}

.btn-buy-bmv:active {
    box-shadow: none;
    transform: translateY(2px);
}

/* Radio pogu centrēšana */
.cursor-pointer { cursor: pointer; }