/* ==========================================================
   MOTOMAN SHOP - ГЛОБАЛЕН CSS
   Този код управлява визията на целия сайт!
   ========================================================== */

/* 1. ГЛОБАЛНИ ПРОМЕНЛИВИ */
:root {
    --brand-primary: #8b0000;         /* Тъмночервено */
    --brand-primary-hover: #5c0000;   /* Тъмночервено при hover */
    --brand-accent: #bfa15f;          /* Златисто за цени */
    --brand-success: #77a464;         /* Зелено за наличности */

    --text-dark: #333333;
    --text-medium: #555555;
    --text-light: #777777;
    --text-white: #ffffff;

    --bg-white: #ffffff;
    --bg-light-grey: #f8f8f8;
    --border-light: #eaeaea;

    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container-max-width: 1280px;
    --transition-speed: 0.3s;
}

/* 2. БАЗОВИ СТИЛОВЕ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Общи бутони за целия сайт */
.btn-primary, .btn-add-to-cart {
    display: inline-block;
    background-color: var(--brand-primary);
    color: var(--text-white);
    border: none;
    padding: 15px 30px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease-in-out;
}

.btn-primary:hover, .btn-add-to-cart:hover {
    background-color: var(--brand-primary-hover);
    color: var(--text-white);
}

/* ==========================================================
   3. ГЛОБАЛЕН ХЕДЪР
   ========================================================== */
header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 0;
    background-color: var(--bg-white);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

.main-nav a:hover {
    color: var(--brand-primary);
}

/* ==========================================================
   4. ГЛОБАЛЕН ФУТЪР (ТЪМЕН МОТО СТИЛ)
   ========================================================== */
.site-footer {
    background-color: #1a1a1a;
    color: #cccccc;
    padding: 60px 0 20px;
    margin-top: 60px;
    font-size: 14px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #cccccc;
}

.footer-widget ul li a:hover {
    color: var(--brand-primary);
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #888888;
}

/* ==========================================================
   5. НАЧАЛНА СТРАНИЦА (HOMEPAGE)
   ========================================================== */
.hero-section {
    padding: 60px 0;
    text-align: center;
}

.hero-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 30px;
}

.categories-section {
    margin-top: 40px;
    margin-bottom: 80px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

.category-card {
    border: 1px solid var(--border-light);
    background-color: #fafafa;
    padding: 20px;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.category-image {
    width: 100%;
    height: 180px;
    object-fit: contain; /* Запазва пропорциите на снимката! */
    margin-bottom: 15px;
    mix-blend-mode: darken; /* Премахва белия фон на снимките върху сивия кард! */
}

.category-name {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: bold;
}

/* ==========================================================
   6. ПРОДУКТОВА СТРАНИЦА (SINGLE PRODUCT)
   ========================================================== */
.product-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.product-gallery {
    flex: 1 1 50%;
    min-width: 0;
    max-width: 100%;
    text-align: center;
}

.product-gallery-placeholder {
    background-color: var(--bg-light-grey);
    border: 1px solid var(--border-light);
    padding: 100px 20px;
}

.product-info {
    flex: 1 1 40%;
    min-width: 300px;
}

.product-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 24px;
    color: var(--brand-accent);
    margin-bottom: 20px;
    font-weight: bold;
}

.product-description {
    color: var(--text-medium);
    margin-bottom: 20px;
}

.cart-form {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--border-light);
    font-size: 16px;
}

.product-tabs {
    border-top: 1px solid var(--border-light);
    padding-top: 40px;
    margin-bottom: 60px;
}


/* ==========================================================
   7. WOOCOMMERCE DEFAULT CLASS MAPPING (INTEGRATION)
   ========================================================== */
.product_title {
    font-size: 28px !important;
    margin-bottom: 10px !important;
}
.price {
    font-size: 24px !important;
    color: var(--brand-accent) !important;
    margin-bottom: 20px !important;
    font-weight: bold !important;
}
.woocommerce-product-details__short-description {
    color: var(--text-medium) !important;
    margin-bottom: 20px !important;
}
form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 30px !important;
}
.qty {
    width: 60px !important;
    height: 40px !important;
    text-align: center !important;
    border: 1px solid var(--border-light) !important;
    font-size: 16px !important;
}
.single_add_to_cart_button, .button {
    display: inline-block !important;
    background-color: var(--brand-primary) !important;
    color: var(--text-white) !important;
    border: none !important;
    padding: 15px 30px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color var(--transition-speed) ease-in-out !important;
}
.single_add_to_cart_button:hover, .button:hover {
    background-color: var(--brand-primary-hover) !important;
}



/* Fix add to cart button inside product grid to not look huge */
ul.products li.product .button {
    display: inline-block !important;
    width: 100% !important;
    background-color: var(--bg-light-grey) !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-light) !important;
    padding: 10px 15px !important;
    font-size: 13px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    border-radius: 4px !important;
    transition: all var(--transition-speed) ease-in-out !important;
    margin-top: auto !important;
}

ul.products li.product .button:hover {
    background-color: var(--brand-primary) !important;
    color: var(--text-white) !important;
    border-color: var(--brand-primary) !important;
}

