/* CSS Variables based on Amazon UI */
:root {
    --nav-bg: #131921;
    --nav-bg-light: #232f3e;
    --nav-hover: #ffffff1a;
    
    --bg-main: #eaeded;
    
    --text-white: #ffffff;
    --text-dark: #0f1111;
    --text-link: #007185;
    --text-link-hover: #c45500;
    
    --accent-orange: #f3a847;
    --accent-orange-hover: #f0c14b;
    --btn-border: #a88734 #9c7e31 #846a29;
    
    --font-main: 'Open Sans', Arial, sans-serif;
    
    --border-radius: 4px;
}

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

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

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

a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

/* Header Styles */
.main-header {
    background-color: var(--nav-bg);
    color: var(--text-white);
}

.header-top {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 10px;
}

.nav-item {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nav-item:hover {
    border-color: var(--text-white);
}

.header-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.location-text, .header-account, .header-orders {
    display: flex;
    flex-direction: column;
}

.text-top {
    font-size: 0.75rem;
    color: #ccc;
    line-height: 14px;
}

.text-bottom {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 15px;
}

.header-location {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 2px;
}

/* Search Bar */
.header-search {
    flex: 1;
    display: flex;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 10px;
}

.search-select {
    background-color: #f3f3f3;
    border: 1px solid #cdcdcd;
    border-right: none;
    color: #555;
    padding: 0 10px;
    outline: none;
    cursor: pointer;
}

.search-select:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 2px rgba(243, 168, 71, 0.5);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 10px;
    font-size: 1rem;
    outline: none;
}

.search-btn {
    background-color: var(--accent-orange);
    border: none;
    width: 45px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: var(--accent-orange-hover);
}

/* Cart */
.header-cart {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    position: relative;
}

.cart-icon {
    font-size: 1.8rem;
}

.cart-count {
    position: absolute;
    top: 2px;
    left: 20px;
    color: var(--accent-orange);
    font-weight: 700;
    font-size: 1rem;
}

/* Header Bottom */
.header-bottom {
    background-color: var(--nav-bg-light);
    display: flex;
    padding: 5px 15px;
    align-items: center;
    gap: 15px;
}

.nav-menu-btn {
    padding: 5px 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-menu-btn:hover {
    border-color: var(--text-white);
}

.secondary-nav-links {
    display: flex;
    gap: 15px;
}

.secondary-nav-links a {
    color: var(--text-white);
    font-size: 0.9rem;
    text-decoration: none;
    padding: 5px;
    border: 1px solid transparent;
}

.secondary-nav-links a:hover {
    border-color: var(--text-white);
    text-decoration: none;
}

/* Hero Section */
.hero {
    position: relative;
    max-width: 1500px;
    margin: 0 auto;
}

.hero-slider {
    width: 100%;
    height: 400px;
}

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

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to bottom, rgba(234, 237, 237, 0), rgba(234, 237, 237, 1));
}

/* Product Container */
.product-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    margin-top: -150px; /* Pull up over hero gradient */
    z-index: 10;
}

/* Category Row */
.category-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.category-card {
    background-color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 420px;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.category-card img {
    flex: 1;
    width: 100%;
    object-fit: contain;
    margin-bottom: 15px;
}

.category-card a {
    font-size: 0.9rem;
}

.sign-in-btn {
    width: 100%;
    margin-top: 15px;
}

/* Deals Section */
.deals-section {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.5rem;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.deal-card {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    transition: box-shadow 0.2s;
}

.deal-card:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.deal-img {
    height: 200px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8;
    margin-bottom: 15px;
}

.deal-img img {
    max-height: 100%;
    max-width: 100%;
    mix-blend-mode: multiply;
}

.deal-badge {
    background-color: #cc0c39;
    color: white;
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    border-radius: 2px;
}

.deal-title {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deal-rating {
    font-size: 0.85rem;
    color: var(--text-link);
    margin-bottom: 10px;
}

.deal-price {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.currency, .fraction {
    font-size: 0.85rem;
    margin-top: 2px;
}

.whole {
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid;
    outline: none;
    box-shadow: 0 2px 5px rgba(15,17,17,.15);
}

.btn-yellow {
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border-color: #a88734 #9c7e31 #846a29;
}

.btn-yellow:hover {
    background: linear-gradient(to bottom, #f5d78e, #eeb933);
}

/* Footer */
.footer {
    background-color: var(--nav-bg-light);
    color: white;
    margin-top: 40px;
}

.back-to-top {
    background-color: #37475a;
    text-align: center;
    padding: 15px;
    font-size: 0.85rem;
    cursor: pointer;
}

.back-to-top:hover {
    background-color: #485769;
}

.footer-links {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 40px 20px;
    gap: 30px;
}

.footer-col h3 {
    font-size: 1rem;
    margin-bottom: 15px;
}

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

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

.footer-col a {
    color: #DDD;
    font-size: 0.9rem;
}

.footer-col a:hover {
    text-decoration: underline;
    color: white;
}

.footer-bottom {
    background-color: var(--nav-bg);
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #3a4553;
}

.footer-logo h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-settings {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #ccc;
}

.copyright {
    font-size: 0.75rem;
    color: #ccc;
}

/* Responsive */
@media (max-width: 1024px) {
    .category-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .header-top {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
    }

    .category-row {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .product-container {
        margin-top: -50px;
    }
}

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