/* Premier Distribution - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-dark: #111115;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-light: #9ca3af;
    --primary-red: #8b0000;
    --primary-red-hover: #6a0000;
    --accent-red: #dc2626;
    --accent-light: #fee2e2;
    --border-color: #e5e7eb;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 12px 30px rgba(139, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Header & Navigation */
.top-bar {
    background-color: var(--bg-dark);
    color: #ffffff;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 2px solid var(--primary-red);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info span {
    margin-right: 20px;
}

.header-main {
    background-color: #ffffff;
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.brand-logo img {
    height: 48px;
    width: auto;
}

.search-form {
    flex: 1;
    max-width: 600px;
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-red);
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 44px;
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-red-hover);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.header-action-btn:hover {
    background-color: var(--bg-alt);
    color: var(--primary-red);
}

.cart-badge {
    background: var(--primary-red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Nav Menu */
.nav-menu-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    padding: 12px 0;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    padding: 8px 0;
    position: relative;
}

.nav-item > a:hover, .nav-item > a.active {
    color: var(--primary-red);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    min-width: 260px;
    border-radius: var(--radius-md);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    list-style: none;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    position: relative;
}

.dropdown-item a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: none;
}

.dropdown-item a:hover {
    background-color: var(--accent-light);
    color: var(--primary-red);
}

.sub-dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    min-width: 240px;
    border-radius: var(--radius-md);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    list-style: none;
}

.dropdown-item:hover .sub-dropdown {
    opacity: 1;
    visibility: visible;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-red);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background: var(--primary-red);
    color: #ffffff;
}

.btn-dark {
    background: var(--bg-dark);
    color: #ffffff;
}

.btn-dark:hover {
    background: #2d2d35;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 80%;
    background: var(--primary-red);
    border-radius: 4px;
}

/* Hero Section */
.hero-slider {
    background: linear-gradient(135deg, #111115 0%, #1c1c24 100%);
    color: #ffffff;
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--accent-red);
}

.hero-content p {
    font-size: 1.1rem;
    color: #d1d5db;
    margin-bottom: 30px;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    border-color: var(--primary-red);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-red);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 10;
}

.product-image-wrap {
    height: 220px;
    padding: 20px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-wrap img {
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.06);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-brand {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-red);
    margin-bottom: 4px;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 16px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.product-old-price {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* Category Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.category-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 16px 0;
}

.breadcrumb a:hover {
    color: var(--primary-red);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #ffffff;
}

.table th, .table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--bg-alt);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    color: #9ca3af;
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 15px;
    font-size: 0.9rem;
}

.footer-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
}

.footer-links {
    list-style: none;
}

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

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #2d2d35;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--bg-dark);
    color: #ffffff;
    padding: 14px 24px;
    border-left: 4px solid var(--primary-red);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: var(--accent-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}
