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

:root {
    --primary: #0071BC;
    --primary-dark: #003D99;
    --primary-light: #4D94FF;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-900: #111827;
    --white: #ffffff;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #f9fafb;
    color: var(--gray-900);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo a {
    text-decoration: none;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
}

.logo-text strong {
    color: var(--gray-900);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown .nav-link {
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    display: none;
    z-index: 1000;
    margin-top: 5px;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border-bottom: 1px solid var(--gray-100);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--gray-50);
    color: var(--primary);
    padding-left: 20px;
}

.cart-link {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.cart-link:hover {
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Promotional Banner */
.promo-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 20px;
    text-align: center;
}

.promo-content h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.promo-content p {
    font-size: 14px;
    opacity: 0.9;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    margin: 20px 0;
    border-radius: 10px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

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

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-danger {
    background: #ef4444;
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-add {
    background: var(--primary);
    color: var(--white);
    padding: 8px 16px;
    font-size: 13px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--gray-100);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
}

.stock-warning {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #f59e0b;
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category {
    color: var(--gray-600);
    font-size: 12px;
    margin-bottom: 10px;
}

.pricing {
    margin: 10px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: var(--gray-900);
}

.price-sale {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
}

.price-original {
    font-size: 14px;
    color: var(--gray-600);
    text-decoration: line-through;
}

.product-controls {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.product-controls input {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
}

/* Featured Section */
.featured-section {
    margin: 50px 0;
}

.featured-section h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 50px 0;
    padding: 30px;
    background: var(--gray-100);
    border-radius: 8px;
}

.feature-box {
    text-align: center;
}

.feature-box h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-box p {
    color: var(--gray-600);
}

/* Products Section */
.products-section {
    margin: 30px 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    padding: 10px 15px;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    width: 300px;
}

/* Cart Section */
.cart-section {
    margin: 30px 0;
}

.empty-cart {
    text-align: center;
    padding: 50px;
    background: var(--gray-100);
    border-radius: 8px;
}

.empty-cart p {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 20px;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.cart-table th {
    background: var(--gray-100);
    font-weight: 600;
}

.quantity-form {
    display: flex;
    gap: 5px;
}

.quantity-form input {
    width: 60px;
    padding: 5px;
    border: 1px solid var(--gray-300);
    border-radius: 3px;
}

.cart-summary {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.summary-item.total {
    font-weight: bold;
    font-size: 18px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.cart-summary .btn {
    margin-bottom: 10px;
}

/* Checkout Section */
.checkout-section {
    margin: 30px 0;
}

.checkout-form {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

fieldset {
    border: none;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
}

legend {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.order-summary {
    background: var(--gray-50);
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.order-summary h3 {
    margin-bottom: 20px;
}

.items-list {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-300);
}

.item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-line.total {
    font-weight: bold;
    font-size: 18px;
    padding-top: 10px;
    border-top: 2px solid var(--gray-300);
    margin-bottom: 20px;
}

/* Order Confirmation */
.confirmation-section {
    margin: 50px 0;
}

.confirmation-box {
    background: var(--white);
    padding: 50px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.success-icon {
    font-size: 60px;
    color: #10b981;
    margin-bottom: 20px;
}

.confirmation-box h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.order-details {
    background: var(--gray-50);
    padding: 20px;
    border-radius: 5px;
    margin: 30px 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.status-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.items-summary {
    margin: 20px 0;
    text-align: left;
}

.confirmation-message {
    color: var(--gray-600);
    margin: 20px 0;
    font-size: 14px;
}

.action-buttons {
    margin-top: 30px;
}

/* Product Detail */
.product-detail-section {
    margin: 30px 0;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
}

.product-image-large {
    position: relative;
}

.product-image-large img {
    width: 100%;
    border-radius: 8px;
}

.sale-badge-large {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 18px;
}

.product-details h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.brand {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 20px;
}

.pricing-large {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 20px 0;
    font-size: 24px;
    font-weight: bold;
}

.price-large {
    color: var(--gray-900);
}

.price-sale-large {
    color: var(--primary);
}

.price-original-large {
    color: var(--gray-600);
    text-decoration: line-through;
    font-size: 18px;
}

.stock-status {
    margin: 20px 0;
    padding: 10px;
    background: var(--gray-100);
    border-radius: 5px;
}

.in-stock {
    color: #10b981;
    font-weight: 600;
}

.out-of-stock {
    color: var(--primary);
    font-weight: 600;
}

.description {
    color: var(--gray-600);
    margin: 20px 0;
    line-height: 1.8;
}

.link-back {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.link-back:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 40px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
}

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

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 16px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 13px;
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--white);
}

.payment-methods {
    color: var(--primary-light);
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }

    .nav-menu {
        width: 100%;
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .checkout-container,
    .cart-container,
    .product-detail {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 32px;
    }

    .search-form input {
        width: 100%;
    }

    .cart-summary,
    .order-summary {
        position: static;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .product-info h3 {
        font-size: 14px;
    }

    .confirmation-box {
        padding: 20px;
    }
}
