/* Налаштування кольорової гами та кастомних стилів */
:root {
    --primary-color: #9e1b1e;
    --primary-hover: #7a1417;
    --secondary-bg: #f9f8f6;
    --accent-color: #e63946;
    --dark-color: #2d2d2d;
    --border-color: #eaeaea;
    --font-main: 'Pt Sans', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    --color-uks-brown: #350503'
    --color-uks-yellow: #fc0'
    --bg-body: #F8F2E8;
}

@import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background-color: var(--secondary-bg);
    color: var(--dark-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    line-height: 1.5;
}

main { flex: 1; }

.container { max-width: 1320px; }

/* Утиліти кольорів */
.bg-custom-primary { background-color: var(--primary-color); }
.text-custom-primary { color: var(--primary-color) !important; }
.text-custom-dark { color: var(--dark-color); }

/* Верхня панель */
.top-bar {
    font-size: 13px;
}
.top-bar a {
    color: white;
    transition: color 0.3s ease;
    text-decoration: none;
}
.top-bar a:hover { color: #e2e8f0; }

/* Навігація */
.header-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-decoration: none !important;
}
.header-logo .brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.header-logo .brand-sub {
    font-size: 10px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}
.nav-link-custom {
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    color: var(--dark-color);
    transition: color 0.3s;
    margin: 0 10px;
    padding: 10px 0;
}
.nav-link-custom:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Кошик */
.cart-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none !important;
}
.cart-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s;
}
.cart-badge {
    position: absolute;
    top: -8px;
    left: 14px;
    background-color: var(--accent-color);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 2px solid white;
}

/* Hero секція */
.hero-section {
    position: relative;
    background-color: #1a202c;
    color: white;
    padding: 60px 0; /* Reduced padding for mobile */
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}
.hero-content {
    position: relative;
    z-index: 10;
}
.hero-content h1 {
    font-size: 2rem; /* Smaller font on mobile */
}

@media (min-width: 768px) {
    .hero-section { padding: 100px 0; }
    .hero-content h1 { font-size: 3.5rem; }
}

.btn-custom-primary {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    transition: background 0.3s;
    text-transform: uppercase;
    border: none;
    letter-spacing: 1px;
    border-radius: 4px;
    font-size: 0.9rem;
}
.btn-custom-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    text-decoration: none;
}
.btn-custom-outline {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    transition: background 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    font-size: 0.9rem;
}
.btn-custom-outline:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

/* Картки товарів */
.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease;
}
.product-card:hover {
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}
.product-img-wrap {
    position: relative;
    padding-top: 75%; /* Aspect Ratio 4:3 */
    overflow: hidden;
    background: #f8f9fa;
}
.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.product-card:hover .product-img {
    transform: scale(1.05);
}
.product-badge-top, .product-badge-new {
    position: absolute;
    top: 8px;
    left: 8px;
    color: white;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.product-badge-top { background-color: var(--accent-color); }
.product-badge-new { background-color: #28a745; }

.product-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--dark-color);
    line-height: 1.3;
    margin-bottom: 5px;
    transition: color 0.3s;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em; /* Fixed height for 2 lines */
}
.product-card:hover .product-title {
    color: var(--primary-color);
    text-decoration: none;
}
.product-sku {
    font-size: 11px;
    color: #adb5bd;
    margin-bottom: 8px;
}
.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}
.product-price small {
    font-size: 0.8rem;
    font-weight: normal;
    color: #6c757d;
}
.btn-light-custom {
    background-color: #f8f9fa;
    color: var(--dark-color);
    font-weight: bold;
    border: none;
    transition: background 0.3s;
}
.btn-light-custom:hover {
    background-color: #e2e6ea;
}

/* Mobile Grid Fixes */
@media (max-width: 576px) {
    .col-6 {
        padding-left: 5px;
        padding-right: 5px;
    }
    .row.mx-n1 {
        margin-left: -5px;
        margin-right: -5px;
    }
    .product-card .p-4 {
        padding: 10px !important;
    }
    .product-title {
        font-size: 0.9rem;
        height: 2.4em;
    }
    .product-price {
        font-size: 1rem;
    }
    .btn-custom-primary {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

/* Футер */
.footer-custom {
    background-color: var(--dark-color);
    color: #d1d5db;
    padding-top: 40px;
    padding-bottom: 20px;
    margin-top: auto;
}
.footer-custom h4 {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 8px; font-size: 14px; }
.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover { color: var(--primary-color); }
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #374151;
    color: white;
    transition: all 0.3s;
    text-decoration: none;
}
.social-btn:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Cart Modal */
.modal-content {
    border-radius: 8px;
    border: none;
}
.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}

/* Category Card */
.category-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    height: 100%;
}
.category-card .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Mobile Category Card */
@media (max-width: 576px) {
    .category-card .card-img-top {
        height: 140px;
    }
}

.category-card:hover .card-img-top {
    transform: scale(1.1);
}
.category-card .card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding-top: 3rem;
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-card .card-title {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-size: 1.2rem; /* Increased font size */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.text-primary { color: var(--primary-color) !important; }
