/* ==========================================================================
   1. GLOBAL STYLES & TYPOGRAPHY
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Droid Sans', sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fcfcfc;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    color: #222;
    margin-top: 0;
}

a {
    transition: all 0.2s ease-in-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* ==========================================================================
   2. HEADER & BRANDING (Top Row)
   ========================================================================== */
#site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #eaeaea;
    padding-top: 15px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 20px;
}

.branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.branding .logo img {
    max-height: 50px;
    width: auto;
}

.title-group h1.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.title-group h1.site-title a {
    text-decoration: none;
    color: #8c3b65; /* Primary Brand Color */
}

.title-group h2.site-description {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-weight: normal;
}

/* Search Box */
.search-box input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 250px;
    max-width: 100%;
    font-family: 'Droid Sans', sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: #8c3b65;
}

/* ==========================================================================
   3. NAVIGATION MENU (Bottom Row & Dropdown)
   ========================================================================== */
.main-nav {
    background-color: #ffffff;
    border-top: 1px solid #eaeaea;
}

.main-nav > .container {
    display: flex;
    justify-content: flex-end; /* Aligns menu to the right */
}

.main-nav > .container > ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 30px;
}

.main-nav li {
    position: relative;
    display: block;
}

.main-nav > .container > ul > li > a {
    text-decoration: none;
    color: #5d4f74; /* Text link color */
    font-weight: 600;
    font-size: 15px;
    padding: 15px 0;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-nav > .container > ul > li > a:hover {
    color: #8c3b65;
}

/* Submenu / Dropdown */
.main-nav .submenu {
    display: flex;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
    border: 1px solid #eaeaea;
    border-top: 2px solid #8c3b65; /* Accent line for dropdown */
    min-width: 180px;
    padding: 5px 0;
    z-index: 1000;
    transition: all 0.2s ease;
    margin: 0;
    list-style: none !important;
}

.main-nav li.has-dropdown:hover .submenu {
    visibility: visible;
    opacity: 1;
}

.main-nav .submenu li {
    padding: 0 15px;
    margin: 0;
}

.main-nav .submenu a {
    text-decoration: none;
    display: block;
    padding: 10px 0;
    font-weight: 400;
    color: #5d4f74;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    text-transform: none;
    letter-spacing: normal;
}

.main-nav .submenu li:last-child a {
    border-bottom: none;
}

.main-nav .submenu a:hover {
    color: #8c3b65;
    padding-left: 5px; /* Clean indent effect on hover */
}

/* ==========================================================================
   4. PAGE STRUCTURE & BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
    margin: 20px 0;
    font-size: 13px;
    color: #777;
}

.breadcrumbs a {
    color: #8c3b65;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

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

.section-title {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #333;
}

/* ==========================================================================
   5. RESPONSIVE PRODUCT GRID
   ========================================================================== */
.grid {
    display: grid;
    gap: 25px;
}

/* 4 Columns by Default */
.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   6. PRODUCT CARDS
   ========================================================================== */
.product-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.product-card img {
    width: 100%;
    max-width: 270px;
    height: 203px;
    object-fit: cover; /* Ensures uniform image sizes */
    object-position: center;
    border-radius: 4px;
    margin: 0 auto 15px;
    background-color: #fff;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 2;
}

.badge.sale {
    background-color: #8c3b65;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Pushes button to bottom */
}

.product-info h3 {
    font-size: 15px;
    margin: 0 0 5px;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.category {
    font-size: 12px;
    color: #888;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin-bottom: 15px;
    margin-top: auto; /* Aligns price/button to bottom of card */
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    width: 100%;
}

.btn-primary {
    background-color: #8c3b65;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #5d4f74;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */

/* Tablets/Small Laptops */
@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Smartphones/Tablets Portrait */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .main-nav > .container {
        justify-content: center;
    }

    .main-nav > .container > ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        width: 100%;
    }
}

/* ==========================================================================
   Footer Divider & Background Styling
   ========================================================================== */
#footer, 
.footer-wrap, 
footer {
    background-color: #f4f5f7; /* Soft, distinct background color */
    border-top: 2px solid #eaeaea; /* Clear top divider line */
    padding: 40px 0 30px;
    margin-top: 60px;
    color: #555;
}

#footer a, 
.footer-wrap a {
    color: #8c3b65;
    text-decoration: none;
}

#footer a:hover, 
.footer-wrap a:hover {
    text-decoration: underline;
}