/*
Theme Name: Scientific Distributor Pro
Theme URI: https://yourdomain.com
Author: Your Name
Author URI: https://yourdomain.com
Description: A professional WooCommerce theme for scientific equipment and laboratory supplies distribution
Version: 1.0.0
License: GPL v2 or later
Text Domain: scidist
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --dark-bg: #34495e;
    --light-bg: #ecf0f1;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --border-color: #bdc3c7;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #f5f6fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.header-contact {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.header-contact i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--white), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span {
    font-size: 0.9rem;
    color: var(--text-light);
    display: block;
}

/* Navigation */
.main-navigation {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 30px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: var(--secondary-color);
    color: var(--white);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 80%;
}

/* Search Bar */
.header-search {
    flex: 0 0 300px;
    position: relative;
}

.header-search form {
    display: flex;
    background: var(--white);
    border-radius: 25px;
    overflow: hidden;
}

.header-search input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 0.95rem;
}

.header-search button {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.header-search button:hover {
    background: var(--accent-color);
}

/* Cart Icon */
.cart-icon {
    position: relative;
    margin-left: 20px;
}

.cart-icon a {
    color: var(--white);
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(52, 73, 94, 0.9)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Category Grid */
.category-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
    padding: 30px 20px;
    position: relative;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.category-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.category-card .product-count {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    display: inline-block;
}

/* Products Grid */
.products-section {
    padding: 60px 0;
    background: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.product-badge.sale {
    background: var(--success-color);
}

.product-badge.new {
    background: var(--warning-color);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--light-bg);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
    transition: bottom 0.3s ease;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.product-actions button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-actions button:hover {
    background: var(--secondary-color);
    transform: rotate(360deg);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.4;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.product-price del {
    font-size: 1rem;
    color: var(--text-light);
    margin-right: 10px;
}

.product-rating {
    color: var(--warning-color);
    margin-bottom: 10px;
}

.product-rating span {
    color: var(--text-light);
    margin-left: 5px;
    font-size: 0.9rem;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background: var(--primary-color);
}

/* Features Section */
.features-section {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: var(--white);
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-item {
    padding: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feature-item p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Sidebar */
.sidebar {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.widget {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
}

/* Product Filters */
.price-filter {
    margin-top: 15px;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.filter-checkbox {
    display: block;
    margin-bottom: 10px;
    color: var(--text-light);
}

.filter-checkbox input {
    margin-right: 10px;
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-info i {
    width: 20px;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Cart Page */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.cart-table th {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    text-align: left;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.cart-table .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-table .product-name {
    font-weight: 500;
    color: var(--primary-color);
}

.cart-table .product-price,
.cart-table .product-subtotal {
    color: var(--accent-color);
    font-weight: bold;
}

.quantity-input {
    width: 60px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
}

.remove-item {
    color: var(--accent-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.remove-item:hover {
    color: #c0392b;
}

.cart-totals {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-top: 30px;
}

.cart-totals h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.cart-totals table {
    width: 100%;
    margin-bottom: 20px;
}

.cart-totals td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-totals tr:last-child td {
    border-bottom: none;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* Checkout Page */
.checkout-section {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.checkout-form {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-weight: 500;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.order-review {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.order-review h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.payment-methods {
    margin-top: 20px;
}

.payment-method {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover,
.payment-method.selected {
    border-color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.05);
}

.place-order-btn {
    width: 100%;
    padding: 15px;
    background: var(--success-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.place-order-btn:hover {
    background: #229954;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .header-main {
        flex-wrap: wrap;
    }
    
    .header-search {
        order: 3;
        flex: 0 0 100%;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        font-size: 1.5rem;
        color: var(--white);
        cursor: pointer;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .checkout-section {
        grid-template-columns: 1fr;
    }
    
    .cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .header-contact {
        flex-direction: column;
        gap: 5px;
    }
}

/* WooCommerce Specific Styles */
.woocommerce-loop-product__title {
    font-size: 1rem !important;
    color: var(--primary-color) !important;
}

.woocommerce-Price-amount {
    color: var(--accent-color) !important;
    font-weight: bold !important;
}

.woocommerce-product-rating .star-rating {
    color: var(--warning-color) !important;
}

.woocommerce .button {
    background: var(--secondary-color) !important;
    color: var(--white) !important;
    border-radius: 5px !important;
    transition: all 0.3s ease !important;
}

.woocommerce .button:hover {
    background: var(--primary-color) !important;
}

/* Scientific Equipment Specific Styles */
.certification-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--success-color);
    color: var(--white);
    font-size: 0.7rem;
    border-radius: 3px;
    margin-right: 5px;
}

.technical-specs {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 10px 0;
    padding: 10px;
    background: var(--light-bg);
    border-radius: 5px;
}

.technical-specs span {
    display: block;
    margin-bottom: 5px;
}

.technical-specs i {
    color: var(--secondary-color);
    width: 20px;
    margin-right: 5px;
}

.msds-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--warning-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 1;
}

.temperature-requirement {
    color: var(--accent-color);
    font-size: 0.85rem;
    margin-top: 5px;
}

.temperature-requirement i {
    margin-right: 5px;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--secondary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.8rem;
    white-space: nowrap;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 10px);
}

/* Quick View Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-color);
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .product-actions,
    .add-to-cart,
    .hero-section {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .product-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}