/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    background: #111;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.logo h1 {
    font-size: 1.5rem;
    color: #ff3333;
}

.logo a {
    text-decoration: none;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.language-switcher select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    color: #fff;
    transition: color 0.3s;
}

.cart-icon:hover {
    color: #ff3333;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff3333;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #111;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

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

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111;
}

.product-price {
    font-size: 1.1rem;
    color: #ff3333;
    font-weight: 600;
}

/* Product Detail */
.product-detail {
    padding: 2rem 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery-main {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-main img {
    width: 100%;
    display: block;
}

.gallery-thumbs {
    display: flex;
    gap: 1rem;
}

.thumb {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumb:hover, .thumb.active {
    border-color: #ff3333;
}

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

.product-details h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #111;
}

.product-meta {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.product-meta p {
    margin-bottom: 0.5rem;
}

.product-meta strong {
    color: #111;
}

.price-calculator {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.price-calculator h3 {
    margin-bottom: 1rem;
    color: #111;
}

.price-tiers {
    margin-bottom: 1.5rem;
}

.price-tiers table {
    width: 100%;
    border-collapse: collapse;
}

.price-tiers th,
.price-tiers td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.price-tiers th {
    background: #f9f9f9;
    font-weight: 600;
    color: #111;
}

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

.quantity-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.quantity-input input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.calculated-price {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.calculated-price .price-display {
    font-size: 1.5rem;
    color: #ff3333;
    font-weight: 700;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #333;
    color: #fff;
}

.btn-primary:hover {
    background: #111;
}

.btn-secondary {
    background: #ff3333;
    color: #fff;
}

.btn-secondary:hover {
    background: #cc0000;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.tube-suggestion {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.tube-suggestion h3 {
    margin-bottom: 1rem;
    color: #111;
}

.tube-link {
    display: inline-block;
    margin-top: 1rem;
    color: #ff3333;
    text-decoration: none;
    font-weight: 600;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #111;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

/* Cart */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

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

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-sku {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.cart-item-price {
    font-weight: 600;
    color: #ff3333;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff3333;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-summary {
    margin-top: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.2rem;
    border-top: 2px solid #333;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

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

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

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

.form-group.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-group.checkbox input {
    width: auto;
    margin-top: 0.25rem;
}

.form-group.checkbox label {
    margin-bottom: 0;
    font-weight: normal;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.error-msg {
    background: #ffe6e6;
    color: #cc0000;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.success-msg {
    background: #e6ffe6;
    color: #008000;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Checkout */
.checkout-container {
    padding: 2rem 0;
}

.checkout-container h2 {
    margin-bottom: 2rem;
    color: #111;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.order-summary {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
}

.order-summary h3 {
    margin-bottom: 1rem;
    color: #111;
}

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

.order-item-name {
    font-weight: 600;
}

.order-item-qty {
    color: #666;
    font-size: 0.9rem;
}

#paypal-button-container {
    margin-top: 1.5rem;
}

/* Footer */
footer {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-layout,
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .modal-content {
        width: 95%;
    }
}