/* isopodistanbull - Main Stylesheet */

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

:root {
    --primary: #000000;
    --primary-dark: #000000;
    --secondary: #333333;
    --accent: #666666;
    --text: #1a1a1a;
    --text-light: #666666;
    --border: #e0e0e0;
    --bg: #fafafa;
    --white: #ffffff;
    --danger: #000000;
    --warning: #333333;
    --success: #000000;
    --hover: #f5f5f5;
    --mobile-nav-height: 84px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid #1a1a1a;
    color: var(--white);
    text-decoration: none;
    border-radius: 14px;
    background: linear-gradient(160deg, #1b1b1b 0%, #000000 100%);
    transition: all 0.2s;
    box-shadow: 0 10px 18px rgba(0,0,0,0.18);
}

.header-cart-link:hover {
    background: linear-gradient(160deg, #2a2a2a 0%, #0a0a0a 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(0,0,0,0.22);
}

.header-cart-icon {
    width: 22px;
    height: 22px;
    display: block;
}

@media (min-width: 769px) {
    .header-content {
        position: relative;
        padding-right: 70px;
    }

    .header-cart-link--desktop {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Hero Section */
.hero {
    background: var(--text);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: -1px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--text);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--text);
    color: var(--white);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 40px 0;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.product-card:hover {
    border-color: var(--text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

.product-info {
    padding: 24px;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.4;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.stock-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stock-instock {
    background: var(--text);
    color: var(--white);
}

.stock-producing {
    background: var(--accent);
    color: var(--white);
}

.stock-out {
    background: var(--border);
    color: var(--text-light);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 16px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Alert */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

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

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

/* Cart Styles */
.cart-table-view {
    display: block;
}

.cart-card-view {
    display: none;
}

.cart-item-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.cart-item-header {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
}

.cart-item-details {
    margin-bottom: 15px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.cart-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 14px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #111111 0%, #000000 100%);
    color: var(--white);
    padding: 50px 0 30px;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

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

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.footer-top > div {
    min-width: 0;
}

.footer-brand {
    padding-right: 10px;
    flex: 1.6;
}

.footer h3 {
    margin-bottom: 12px;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.footer h4 {
    margin-bottom: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.75);
}

.footer-brand p {
    color: rgba(255,255,255,0.72);
    max-width: 420px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: center;
}

.footer-links h4 {
    margin-bottom: 0;
}

.footer-links-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    min-width: 200px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-link-pill:hover {
    background: rgba(255,255,255,0.2);
}

.footer-contact {
    flex: 1;
    text-align: right;
}

@media (max-width: 960px) {
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        justify-content: flex-start;
        width: 100%;
    }

    .footer-contact {
        text-align: left;
        width: 100%;
    }
}

.footer-contact p {
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin-top: 6px;
}

.footer a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.footer a:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav a {
    display: block;
    padding: 15px;
    color: var(--text);
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.mobile-nav a:hover {
    background: var(--bg);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 10px 0 env(safe-area-inset-bottom);
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    box-sizing: border-box;
    z-index: 100;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.08);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    padding: 5px;
    transition: color 0.3s;
}

.mobile-nav-item:hover {
    color: var(--primary);
}

.mobile-nav-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.mobile-nav-label {
    font-size: 11px;
    font-weight: 500;
}

@media (max-width: 768px) {
    /* Hide desktop nav */
    .desktop-nav {
        display: none !important;
    }

    .header-cart-link--desktop {
        display: none;
    }

    /* Show mobile elements */
    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    /* Adjust main padding for bottom nav */
    body {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    }

    main {
        padding-bottom: 0;
    }

    .header-content {
        justify-content: space-between;
    }

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

    .hero p {
        font-size: 16px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .container {
        padding: 0 15px;
    }

    /* Adjust footer for mobile */
    .footer {
        margin-bottom: 0;
        padding-bottom: 30px;
    }

    /* Product detail responsive */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Checkout responsive */
    div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Cart responsive - Hide table, show cards */
    .cart-table-view {
        display: none !important;
    }

    .cart-card-view {
        display: block !important;
    }
}

/* Admin Styles */
.admin-sidebar {
    width: 250px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 20px;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    padding: 30px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

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

.table th {
    background: var(--bg);
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}
