/* YITH CBD Shop - Main Stylesheet */
/* Responsive design for all devices */

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

:root {
    --primary-color: #2d5016;
    --secondary-color: #6b8e23;
    --accent-color: #9acd32;
    --text-color: #333;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --border-color: #ddd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
}

/* Navigation */
nav {
    background-color: var(--secondary-color);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: block;
    transition: background-color 0.3s;
    border-radius: 4px;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    font-weight: 600;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

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

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

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

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

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

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: var(--light-bg);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-price {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.badge-bestseller {
    background-color: var(--warning-color);
}

.badge-auction {
    background-color: var(--danger-color);
    color: var(--white);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

/* Cart */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--white);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1.5rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.cart-summary {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    color: var(--primary-color);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--white);
}

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

table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

table tr:hover {
    background-color: var(--light-bg);
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

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

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

.footer-section a {
    color: var(--white);
    text-decoration: none;
}

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

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        display: none;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    .container {
      width: 100%;
  max-width: 1200px;
  margin: auto;  
        padding: 0 10px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Print styles */
@media print {
    header, nav, footer, .btn {
        display: none;
    }
    
    body {
        color: #000;
    }
}

/* Content Cards */
.content-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.content-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.content-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Product Image Placeholder */
.product-image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--light-bg), var(--border-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1.1rem;
    font-weight: 600;
}

.home-info {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.home-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}
