/* --- Global Resets & Basic Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Amazon Ember", Arial, sans-serif;
}

body {
    background-color: white;
    color: #0F1111;
    font-size: 14px;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: #007185; /* Amazon link blue */
}
a:hover {
    color: #C7511F; /* Amazon link hover orange */
    text-decoration: underline;
}

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

.content-section {
    padding: 20px;
    max-width: 1500px;
    margin: 0 auto;
}

/* --- Header Styles --- */
#main-header {
    background-color: #2c3e50; /* Deep blue-gray for a modern feel */
    color: #ecf0f1;            /* Light gray for readability */
    
}

.header-top {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    min-height: 60px;
    flex-wrap: nowrap; /* Prevent wrapping on very small screens initially */
}


#logo { height: 30px; margin-top: 1px; cursor: none;}

.deliver-to {
    display: flex;
    align-items: center;
    padding: 5px;
    border: 1px solid transparent;
    margin-right: 5px;
    cursor: pointer;
}
.deliver-to:hover { border-color: #fff; }
.deliver-to i { font-size: 18px; margin-right: 3px; margin-top: 8px; }
.deliver-to .line1 { font-size: 12px; color: #ccc; display: block; }
.deliver-to .line2 { font-size: 14px; font-weight: bold; }

.search-bar-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    margin-right: 10px;
    border-radius: 4px;
    overflow: hidden;
    max-width: 700px; /* Limit search bar width */
}
#search-category, #search-category-header {
    padding: 10px 5px;
    background-color: #f3f3f3;
    color: #555;
    border: none;
    border-right: 1px solid #ccc;
    cursor: pointer;
    font-size: 12px;
    border-radius: 4px 0 0 4px;
}
#search-input, #search-input-header {
    flex-grow: 1;
    padding: 10px;
    border: none;
    font-size: 15px;
}
#search-input:focus, #search-input-header:focus {
    outline: 2px solid #febd69;
}
#search-button, #search-button-header {
    background-color: #febd69;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}
#search-button i, #search-button-header i { font-size: 18px; color: #111; }
#search-button:hover, #search-button-header:hover { background-color: #f3a847; }

.header-nav-right { display: flex; align-items: center; }
.header-nav-right .nav-item {
    padding: 8px 9px;
    cursor: pointer;
    border: 1px solid transparent;
    margin-left: 2px;
    white-space: nowrap;
}
.header-nav-right .nav-item:hover { border-color: #fff; }
.nav-item .line1 { font-size: 12px; display: block; }
.nav-item .line2 { font-size: 14px; font-weight: bold; }
.nav-item.language img { vertical-align: middle; }
.nav-item.cart { display: flex; align-items: flex-end; }
.cart-link {
    align-items: right;
    color: white;
    text-decoration: none;
    padding: 8px; /* Add padding to the link itself for better hover */
    border: 1px solid transparent;
}
.cart-link:hover {
    border-color: #fff;
    text-decoration: none; /* Prevent underline on hover for this specific link */
}
.nav-item.cart i { font-size: 26px; margin-right: 2px; }
#cart-count { color: #febd69; margin: 0 2px 0 -2px; font-weight: bold; font-size: 16px; }

/* Sub Navigation */
#sub-nav {
    background-color: #232f3e;
    padding: 0 10px;
    min-height: 39px;
    display: flex;
    align-items: center;
}
#sub-nav ul { list-style: none; display: flex; align-items: center; flex-wrap: wrap; }
#sub-nav li a {
    color: #fff;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 500;
    display: block;
    border: 1px solid transparent;
    border-radius: 2px;
}
#sub-nav li a:hover { border-color: #fff; text-decoration: none; }
#sub-nav li a i { margin-right: 5px; }

/* --- Hero Section --- */
#hero-section {
    margin-bottom: -250px; /* Pulls content below over the hero gradient */
    position: relative; /* Needed if you add carousel controls */
    margin-bottom: 100px;
}
#hero-section img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
    mask-image: linear-gradient(to bottom, white 60%, transparent 100%);
    margin-top: 10px;
    margin-bottom:-0px;
  
}

/* --- Product Grid & Card Styles --- */
#product-grid-container, .product-category-section {
    position: relative; /* To sit above the hero's negative margin */
    z-index: 1;
    margin-bottom: 20px;
}
#product-grid-container h2, .product-category-section h2 {
    font-size: 21px;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 15px;
    background-color: #f; /* Cards often have headers like this */
    border-radius: 4px 4px 0 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    padding: 0 15px 15px 15px; /* Padding inside the grid container if header has background */
    background-color: #fff; /* if the h2 has a background, the grid might too */
    border-radius: 0 0 4px 4px;
    box-shadow: 0 1px 2px#ffffff;
}

.product-card {
    background-color: #fff; /* Individual cards might be transparent if grid has bg */
    padding: 15px;
    border: 1px solid #0000005f;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s ease-in-out;
}
.product-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.656);
}

.product-card-link { /* The <a> tag wrapping image and title */
    text-decoration: none;
    color: inherit;
    display: block; /* Make the link take up space */
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
    cursor: none;
}
.product-card h3 {
    font-size: 14px; /* Amazon uses smaller font for product titles */
    margin-bottom: 5px;
    line-height: 1.3;
    color: #0F1111;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Max 3 lines */
    -webkit-box-orient: vertical;
    min-height: 3.9em; /* 3 lines * 1.3 line-height */
}
.product-card .rating { margin-bottom: 5px; color: #ffa41c; font-size: 13px; }
.product-card .rating .far.fa-star { color: #ccc; } /* Empty stars */
.product-card .price {
    font-size: 17px; /* Slightly smaller price for INR */
    font-weight: bold;
    margin-bottom: 10px;
    color: #B12704;
}
.product-card .price .currency-symbol { font-size: 13px; }
.product-card .add-to-cart-btn {
    background-color: #ffd814;
    color: #0F1111;
    border: 1px solid;
    border-color: #FCD200 #F8C100 #F0B800;
    border-radius: 20px;
    padding: 6px 15px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: background-color 0.2s ease;
    align-self: center;
    width: 80%;
    margin-top: auto;
}
.product-card .add-to-cart-btn:hover { background-color: #f7ca00; }

/* Product Scroll Grid */
.product-scroll-grid {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 15px;
    background-color: #fff;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.product-scroll-grid .product-card { min-width: 210px; flex-shrink: 0; }
.product-scroll-grid .product-card img { height: 160px; }

/* --- Product Detail Page Styles --- */
#product-detail-main {
    background-color: #fff; /* White background for detail page content area */
    padding-top: 20px;
}
.product-detail-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 20px auto;
    padding: 20px;
    background-color: #fff; /* Ensure white background if main is different */
}
.product-image-column {
    flex: 0 0 40%; /* Fixed width for image column */
    text-align: center;
}
.product-image-column img#product-detail-image {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
}
.product-info-column {
    flex: 1; /* Takes remaining space */
}
#product-detail-title {
    font-size: 24px;
    font-weight: 400; /* Amazon titles are not too bold */
    margin-bottom: 8px;
    line-height: 1.3;
}
.product-detail-rating {
    font-size: 14px;
    color: #ffa41c;
    margin-bottom: 10px;
}
.product-detail-rating .review-count {
    color: #007185;
    margin-left: 5px;
}
#product-detail-price {
    font-size: 28px;
    color: #B12704;
    margin-bottom: 10px;
}
#product-detail-price .currency-symbol { font-size: 16px; }
.product-detail-description-title {
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 5px;
}
#product-detail-description {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}
#add-to-cart-detail-btn {
    background-color: #FFD814; /* Amazon yellow */
    color: #0F1111;
    border: 1px solid;
    border-color: #FCD200 #F8C100 #F0B800;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-block; /* Or block with width */
    margin-top: 15px;
}
#add-to-cart-detail-btn:hover { background-color: #F7CA00; }

/* --- Cart Page Styles --- */
#cart-main { padding: 0; /* Let container handle padding */ }
.cart-container {
    max-width: 1050px; /* Slightly wider for Amazon.in cart */
    margin: 20px auto;
    display: flex;
    gap: 20px;
    align-items: flex-start; /* Align top */
    padding: 0 15px;
}
.cart-items-panel {
    flex-grow: 1;
    background-color: #fff;
    padding: 0; /* Header has padding */
    border-radius: 4px;
    border: 1px solid #ddd;
}
.cart-items-panel h1 {
    font-size: 24px;
    font-weight: 400;
    padding: 18px 20px;
    border-bottom: 1px solid #ddd;
}
#cart-items-list { padding: 0 20px; }
.cart-item {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    gap: 15px;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-image {
    width: 120px; /* Smaller images in cart */
    height: 120px;
    object-fit: contain;
    align-self: flex-start;
}
.cart-item-details { flex-grow: 1; }
.cart-item-title {
    font-size: 16px;
    margin-bottom: 4px;
    font-weight: bold;
}
.cart-item-price {
    font-size: 16px;
    font-weight: bold;
    color: #B12704;
    margin-bottom: 4px;
}
.cart-item-stock { font-size: 12px; color: #007600; margin-bottom: 8px; }
.cart-item-actions { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.quantity-select {
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #ccc;
    background-color: #f0f2f2;
    box-shadow: 0 1px 0 rgba(255,255,255,.5) inset;
    cursor: pointer;
    font-size: 12px;
    height: 28px;
}
.remove-item-btn {
    background: none; border: none; color: #007185;
    cursor: pointer; font-size: 12px; padding: 0;
}
.cart-item-subtotal-price {
    font-size: 16px;
    font-weight: bold;
    color: #0F1111; /* Black for item subtotal */
    margin-left: auto;
    align-self: flex-start;
    min-width: 80px;
    text-align: right;
}
.cart-subtotal-footer {
    text-align: right;
    font-size: 18px;
    padding: 18px 20px;
    border-top: 1px solid #ddd;
}
.cart-subtotal-footer .price, .cart-summary-box .price {
    font-weight: bold;
    color: #B12704; /* Red for main subtotal */
}
.cart-summary-panel { width: 300px; flex-shrink: 0; }
.cart-summary-box {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.cart-summary-box p:first-child { font-size: 16px; margin-bottom: 15px; }
.checkout-form label {
    display: block;
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 3px;
    color: #555;
}
.checkout-form input[type="text"],
.checkout-form input[type="tel"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #a6a6a6;
    border-top-color: #949494;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(0,0,0,.07) inset;
    font-size: 13px;
    margin-bottom: 10px;
}
.checkout-form input[type="text"]:focus,
.checkout-form input[type="tel"]:focus {
    border-color: #e77600;
    box-shadow: 0 0 3px 2px rgba(228,121,17,.5);
    outline: 0;
}
#proceed-to-checkout-btn {
    background: linear-gradient(to bottom,#f7dfa5,#f0c14b);
    border: 1px solid;
    border-color: #a88734 #9c7e31 #846a29;
    border-radius: 3px;
    color: #111;
    padding: 10px;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
}
#proceed-to-checkout-btn:hover { background: linear-gradient(to bottom,#f5d78e,#eeb933); }
.checkout-message {
    font-size: 12px;
    margin-top: 10px;
    padding: 8px;
    border-radius: 3px;
}
.checkout-message.success { background-color: #e7f4e4; color: #007600; border: 1px solid #c3e6cb; }
.checkout-message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- Footer Styles --- */
#main-footer { font-size: 13px;}
.footer-back-to-top {
    background-color: #37475A;
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 13px;
    cursor: pointer;
}
.footer-back-to-top:hover { background-color: #485769; }
.footer-links {
    background-color: black;
    color: #DDD;
    display: flex;
    justify-content: space-around;
    padding: 20px 20px;
    max-width: 1800px;
    margin: 0 auto;
    border-bottom: 1px solid #3a4553;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}
.link-column {
    min-width: 150px; /* Ensure columns don't get too squeezed */
    margin: 10px 20px; /* Spacing between columns */
}
.link-column h3 { color: #fff; font-size: 16px; margin-bottom: 10px; }
.link-column ul { list-style: none; }
.link-column ul li a { display: block; padding: 5px 0; color: #DDD; font-size: 13px; }
.link-column ul li a:hover { text-decoration: underline; color: #fff; }
.footer-bottom {
    background-color: #131921;
    color: #DDD;
    text-align: center;
    padding: 30px 20px;
    font-size: 11px;
}
#footer-logo {
    height: 25px;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}
.footer-country-options { margin-bottom: 10px; }
.footer-country-options span { margin: 0 5px; cursor: pointer; }
.footer-country-options span:hover { text-decoration: underline; }
.footer-legal a { margin: 0 7px; color: #DDD; }
.footer-legal .copyright { display: block; margin-top: 5px; color: #999; }

/* --- Responsive Adjustments --- */
@media (max-width: 1000px) {
    .header-top { flex-wrap: wrap; }
    .search-bar-container { order: 3; width: 100%; margin: 10px 0 0 0; max-width: none;}
    .deliver-to { display: none; } /* Hide for simplicity */
    .header-nav-right { margin-left: auto; }
    #sub-nav ul { justify-content: center; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .cart-container { flex-direction: column; }
    .cart-summary-panel { width: 100%; order: -1; margin-bottom: 20px; }
}

@media (max-width: 768px) {
    .header-nav-right .nav-item.language, .header-nav-right .nav-item.orders { display: none; }
    #sub-nav { padding: 0 5px; min-height: auto; }
    #sub-nav ul li a { font-size: 12px; padding: 6px 7px; }
    .product-detail-container { flex-direction: column; }
    .product-image-column img#product-detail-image { max-height: 300px; }
    #product-detail-title { font-size: 20px; }
    #product-detail-price { font-size: 24px; }
    .cart-item { flex-direction: column; align-items: center; text-align: center; }
    .cart-item-image { width: 100px; height: 100px; margin-bottom: 10px; }
    .cart-item-subtotal-price { margin-left: 0; margin-top: 10px; align-self: center; }
    .footer-links { flex-direction: column; align-items: center; text-align: center; }
    .link-column { margin: 15px 0; }
}

@media (max-width: 480px) {
    .header-top { padding: 10px 5px; }
    #logo { height: 25px; }
    .search-bar-container { margin-top: 5px; }
    #search-category-header, #search-category { font-size: 11px; padding: 8px 3px;}
    #search-input-header, #search-input { padding: 8px; font-size: 13px;}
    #search-button-header i, #search-button i { font-size: 16px; }
    #search-button-header, #search-button { padding: 8px 12px;}
    .header-nav-right .nav-item.account .line1 { display: none; }
    .header-nav-right .nav-item.account .line2 { font-size: 13px; }
    .nav-item.cart i { font-size: 22px; }
    .cart-link { padding: 6px; }
    #cart-count { font-size: 14px; }
    #product-grid-container h2, .product-category-section h2 { font-size: 18px; padding: 10px; }
    .product-grid { gap: 10px; padding: 0 10px 10px 10px; }
    .product-card { padding: 10px; }
    .product-card img { height: 150px; }
    .product-card h3 { font-size: 13px; min-height: 3.6em; -webkit-line-clamp: 2;}
    .product-card .price { font-size: 15px; }
    .product-card .add-to-cart-btn { width: 90%; padding: 5px 10px; font-size: 12px; }
    #product-detail-title { font-size: 18px; }
    .cart-items-panel h1 { font-size: 20px; padding: 15px; }
    #cart-items-list { padding: 0 15px; }
    .cart-item-title, .cart-item-price, .cart-item-subtotal-price { font-size: 14px; }
}