/* PM Stores - Main Stylesheet */

/* ===================================
   PROFESSIONAL 3-COLOR SYSTEM:
   - Navy: #0f172a (Primary brand, text)
   - Royal Blue: #2563eb (Actions, links)  
   - Slate: #64748b (Secondary, borders)
   =================================== */

:root {
    /* The 3 Core Colors */
    --navy: #0f172a;
    --blue: #2563eb;
    --slate: #64748b;
    
    /* Variations */
    --navy-light: #1e293b;
    --blue-light: #3b82f6;
    --blue-dark: #1d4ed8;
    --slate-light: #94a3b8;
    --slate-lighter: #cbd5e1;
    --slate-lightest: #f1f5f9;
    
    /* Backgrounds */
    --bg: #f8fafc;
    --white: #ffffff;
    
    /* Functional (keep minimal) */
    --success: #059669;
    --error: #dc2626;
    
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--navy);
    line-height: 1.6;
}

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

/* Buttons */
.btn {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.btn-small {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
}

.btn-secondary {
    display: inline-block;
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--slate-lighter);
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--slate-lightest);
    color: var(--navy);
    border-radius: var(--radius);
    text-decoration: none;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--slate-lighter);
    border-radius: var(--radius);
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
}

/* Messages */
.error, .alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid #fecaca;
}

.success, .alert-success {
    background: #d1fae5;
    color: #065f46;
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.product-card h3 {
    padding: 12px 16px 4px;
    font-size: 16px;
}

.product-card .price {
    padding: 0 16px;
    font-weight: 600;
    color: var(--primary);
}

.product-card .actions {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}

.product-card .tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--green);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.product-card.sale .old {
    text-decoration: line-through;
    color: var(--gray);
    margin-right: 8px;
}

.product-card.sale .new {
    color: var(--accent);
    font-weight: 600;
}

.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Empty state */
.empty {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.center {
    text-align: center;
    margin: 32px 0;
}

/* Page titles */
h1 {
    font-size: 32px;
    margin: 24px 0 8px;
}

.subtitle {
    color: var(--gray);
    margin-bottom: 24px;
}

/* Category colors */
.red { background: var(--red); }
.blue { background: var(--blue); }
.green { background: var(--green); }
.pink { background: #ec4899; }

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Large tablets (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .section {
        padding: 40px 0;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    .section {
        padding: 32px 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Form elements */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }
    
    /* Product grid adjustments */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-info h3 {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
}

/* Mobile phones (640px and below) */
@media (max-width: 640px) {
    .container {
        padding: 0 12px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .section {
        padding: 24px 0;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    
    /* Product grid - single column for very small screens */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image {
        height: 160px;
    }
    
    /* Tables scroll horizontally */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Alerts stack nicely */
    .alert {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination a, .pagination span {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 17px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-info h3 {
        font-size: 13px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .btn:hover {
        transform: none;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}











