/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: orange;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: orange;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: red;
}

.btn-secondary {
    background-color: orange;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: red;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid orange;
    color: orange;
}

.btn-outline:hover {
    background-color: red;
    color: white;
}

.btn-danger {
    background-color: orange;
    color: white;
}

.btn-danger:hover {
    background-color: red;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.9em;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1.1em;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #333;
    font-weight: 500;
}

.nav-links a:hover {
    color: red;
}

.cart-count {
    background-color: orange;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 5%;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    background-color: orange;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Hero section */
.hero {
    background-color: #E9E1FC;
    color: orange;
    padding: 4rem 0;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 2rem;
    background-image: url("https://images.brilliantmade.com/uploads/attachment/file/67015/Brilliant-swag-storefront-hero-2600x1200_v3%282%29.webp");
    background-position: center;
    background-size: cover;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.2rem;
}

.product-card .category {
    padding: 0 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.product-card .price {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: orange;
}

.product-card .btn {
    margin: 0 1rem 1rem;
    width: calc(100% - 2rem);
}

.view-all {
    text-align: center;
    margin: 2rem 0;
}

/* Product detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

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

.product-info h1 {
    margin-bottom: 1rem;
}

.product-info .category {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.product-info .price {
    font-size: 1.5rem;
    font-weight: 600;
    color: orange;
    margin-bottom: 1rem;
}

.product-info .description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.quantity-control {
    margin-bottom: 1rem;
}

.quantity-control label {
    margin-right: 0.5rem;
}

.quantity-control input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Cart */
.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 80px;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.item-details h3 {
    margin-bottom: 0.5rem;
}

.update-cart-form {
    display: flex;
    align-items: center;
}

.update-cart-form label {
    margin-right: 0.5rem;
}

.update-cart-form input {
    width: 50px;
    padding: 0.25rem;
    margin-right: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.item-total {
    font-weight: 600;
}

.cart-summary {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    font-size: 1.2rem;
}

.total-price {
    font-weight: 700;
    color: #27ae60;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.empty-cart p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Checkout */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.order-summary, .checkout-form {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.summary-items {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #eee;
    font-weight: 600;
    font-size: 1.1rem;
}

.checkout-form h2 {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    width: 50%;
}

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    height: 100px;
}

/* Footer */
footer {
    background-color: #2f2b6b;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #3498db;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ddd;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.subscribe-form .form-group {
    display: flex;
}

.subscribe-form input {
    flex-grow: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px 0 0 4px;
}

.subscribe-form button {
    border-radius: 0 4px 4px 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #444;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 5%;
    padding-right: 5%;
}

/* Responsive styles */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .item-quantity, .item-total, .item-actions {
        grid-column: span 2;
        margin-top: 0.5rem;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .subscribe-form .form-group {
        flex-direction: column;
    }
    
    .subscribe-form input {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    .subscribe-form button {
        border-radius: 4px;
        width: 100%;
    }
}