/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* Define root variables and base styles */
:root {
    --brand-red: #901a1c;
    --brand-red-dark: #7D0606;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Reusable container class */
.wrap {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Header Styles */
.top-bar {
    background-color: var(--brand-red);
    padding: 0.5rem 1.5rem;
}

.social-icon {
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    padding: 0.25rem;
    border-radius: 0.5rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.social-icon:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.header-icon {
    color: #4a5568; /* text-gray-600 */
    transition: color 0.2s;
}
.header-icon:hover {
    color: var(--brand-red);
}

/* Navigation Styles */
.nav-item {
    position: relative;
}
.nav-link {
    display: block;
    padding: 1rem 1rem;
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    color: #333;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 4px;
}
.nav-link:hover {
    color: var(--brand-red);
    background-color: #f3f4f6;
}
.nav-link .arrow {
    font-size: 0.6rem;
    margin-left: 0.25rem;
    display: inline-block;
    transition: transform 0.2s;
}
.nav-item:hover .arrow {
    transform: rotate(180deg);
}
.nav-link-sale {
    color: var(--brand-red);
    font-weight: 700;
}

/* Hero & Section Styles */
.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}
.hero-card:hover img {
    transform: scale(1.03);
}

.section-title {
    text-align: center;
    font-size: 1.75rem; /* 28px */
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1f2937;
}

/* Category Card Styles */
.category-card {
    position: relative;
    display: block;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.category-card:hover img {
    transform: scale(1.05);
}
.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    border-radius: 0 0 0.5rem 0.5rem;
}
.category-card h3 {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    z-index: 10;
    line-height: 1.2;
}


/* Product Grid and Card Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.3s, transform 0.3s;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 0.5rem;
}
.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    height: 4.2em; /* 3 lines */
    overflow: hidden;
}
.product-price {
    font-weight: 700;
    color: var(--brand-red);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* Product Buttons */
.product-card button {
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background-color: var(--brand-red);
    color: white;
    border: 1px solid var(--brand-red);
}
.btn-primary:hover {
    background-color: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
}
.btn-variant {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}
.btn-variant:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}
.btn-out-of-stock {
    background-color: #f3f4f6;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
    cursor: not-allowed;
}


/* Brand Card Styles */
.brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: white;
    transition: box-shadow 0.2s;
}
.brand-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}
.brand-card img {
    max-height: 50px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
}
.brand-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Footer Styles */
.footer {
    background: linear-gradient(to bottom, #7D0606, #300202);
}
.footer-title {
    position: relative;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 2rem;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 99px;
}
.footer-link {
    display: inline-block;
    position: relative;
    font-size: 0.875rem;
    color: #d1d5db; /* text-gray-300 */
    transition: color 0.2s;
}
.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: rgba(255, 255, 255, 0.5);
    transition: width 0.3s;
}
.footer-link:hover {
    color: white;
}
.footer-link:hover::after {
    width: 100%;
}