/* ============================================
   RAJSHAHI ONLINE SHOP - COMPLETE E-COMMERCE CSS
   ============================================ */

/* 1. BASE TYPOGRAPHY SYSTEM */
:root {
    /* Font Sizes - Standardized Scale */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-md: 18px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-xxl: 28px;
    --font-size-xxxl: 32px;
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    
    /* Letter Spacing */
    --letter-spacing-tight: -0.5px;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.5px;
    
    /* Colors */
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #2c3e50;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
}

/* 2. GLOBAL TEXT RESET */
body {
    font-family: 'Open Sans', sans-serif;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: #333333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 3. HEADINGS STANDARDIZATION */
h1, .h1 {
    font-size: var(--font-size-xxxl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: 20px;
    color: var(--dark);
    letter-spacing: var(--letter-spacing-tight);
}

h2, .h2 {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: 18px;
    color: var(--dark);
}

h3, .h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: 16px;
    color: #34495e;
}

h4, .h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    margin-bottom: 14px;
    color: #34495e;
}

h5, .h5 {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    margin-bottom: 12px;
    color: var(--dark);
    text-transform: uppercase;
}

h6, .h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-normal);
    margin-bottom: 10px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

/* 4. PARAGRAPH & BODY TEXT */
p {
    margin-bottom: 16px;
    line-height: var(--line-height-relaxed);
    color: #555555;
}

.lead {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: #666666;
}

.small-text {
    font-size: var(--font-size-sm);
    line-height: 1.4;
    color: #777777;
}

.xsmall-text {
    font-size: var(--font-size-xs);
    line-height: 1.3;
    color: #888888;
}

/* 5. LINKS STANDARDIZATION */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.c-link {
    font-weight: var(--font-weight-medium);
    color: var(--primary);
}

.c-link:hover {
    color: var(--primary-dark);
}

/* 6. BUTTON TEXT */
.btn {
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    font-size: var(--font-size-sm);
}

.c-btn-add-cart {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    letter-spacing: 0.5px;
}

/* 7. NAVIGATION TEXT */
.nav-link {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    padding: 8px 16px;
}

.dropdown-menu .fas {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

/* 8. PRODUCT TEXT STANDARDIZATION */
.c-product-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1.4;
    margin-bottom: 8px;
    height: auto;
    min-height: 45px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-product-category {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.c-price-current {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--danger);
}

.c-price-old {
    font-size: var(--font-size-sm);
    color: var(--gray);
    font-weight: var(--font-weight-normal);
    text-decoration: line-through;
}

.c-price-discount {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--danger);
}

.c-product-rating {
    font-size: var(--font-size-sm);
    color: var(--warning);
}

.c-product-stock {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

.c-in-stock {
    color: var(--success);
}

.c-low-stock {
    color: var(--warning);
}

.c-out-stock {
    color: var(--danger);
}

/* 9. CATEGORY TEXT */
.c-category-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
    margin-bottom: 8px;
}

.c-category-count {
    font-size: var(--font-size-xs);
    color: var(--gray);
    font-weight: var(--font-weight-normal);
}

/* 10. FOOTER TEXT */
.c-layout-footer {
    color: #bdc3c7;
    font-size: var(--font-size-sm);
}

.c-layout-footer h5,
.c-layout-footer .h5 {
    color: white;
    font-size: var(--font-size-md);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    display: inline-block;
}

.c-layout-footer ul li {
    margin-bottom: 12px;
    line-height: 1.5;
}

.c-layout-footer .fas {
    font-size: 14px;
    width: 20px;
}

.c-postfooter {
    font-size: var(--font-size-xs);
    color: var(--gray);
}

/* 11. FORM TEXT */
.form-control,
.c-search-input {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    color: #333333;
}

.form-control::placeholder {
    color: var(--gray);
    font-weight: var(--font-weight-normal);
}

/* 12. BADGES & LABELS */
.c-product-badge {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.c-badge-new {
    background: var(--success);
    color: white;
}

.c-badge-hot {
    background: var(--danger);
    color: white;
}

.c-badge-sale {
    background: var(--warning);
    color: white;
}

.c-badge-featured {
    background: var(--primary);
    color: white;
}

/* 13. CART TEXT */
.c-cart-product-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
}

.c-cart-product-category {
    font-size: var(--font-size-xs);
    color: var(--gray);
}

/* 14. UTILITY TEXT CLASSES */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--primary) !important; }
.text-light { color: var(--light) !important; }
.text-dark { color: var(--dark) !important; }
.text-muted { color: var(--gray) !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

/* 15. FONT WEIGHT UTILITIES */
.font-weight-light { font-weight: var(--font-weight-light) !important; }
.font-weight-normal { font-weight: var(--font-weight-normal) !important; }
.font-weight-medium { font-weight: var(--font-weight-medium) !important; }
.font-weight-semibold { font-weight: var(--font-weight-semibold) !important; }
.font-weight-bold { font-weight: var(--font-weight-bold) !important; }

/* ============================================
   E-COMMERCE COMPONENTS
   ============================================ */

/* Product Cards */
.c-product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
}

.c-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.c-product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f8f9fa;
}

.c-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.c-product-card:hover .c-product-image img {
    transform: scale(1.05);
}

.c-product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.c-product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.c-product-card:hover .c-product-actions {
    opacity: 1;
}

.c-product-action-btn {
    display: block;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    margin-bottom: 10px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.c-product-action-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    text-decoration: none;
}

.c-product-info {
    padding: 20px;
}

.c-product-price {
    margin-bottom: 15px;
}

.c-product-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.c-btn-add-cart {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.5px;
}

.c-btn-add-cart:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.c-btn-add-cart:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.c-btn-quick-view {
    width: 40px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c-btn-quick-view:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Category Cards */
.c-category-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
}

.c-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.c-category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 28px;
}

.c-category-card:nth-child(2) .c-category-icon {
    background: linear-gradient(135deg, var(--danger), #c0392b);
}

.c-category-card:nth-child(3) .c-category-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.c-category-card:nth-child(4) .c-category-icon {
    background: linear-gradient(135deg, var(--warning), #e67e22);
}

.c-category-card:nth-child(5) .c-category-icon {
    background: linear-gradient(135deg, var(--success), #27ae60);
}

.c-category-card:nth-child(6) .c-category-icon {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

.c-category-title a {
    color: var(--dark);
    text-decoration: none;
}

.c-category-title a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Shopping Cart */
.c-cart-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.c-cart-table th {
    background: #f8f9fa;
    padding: 15px;
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
    border-bottom: 2px solid #e0e0e0;
}

.c-cart-table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
}

.c-cart-product {
    display: flex;
    align-items: center;
}

.c-cart-product-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
    background: #f8f9fa;
}

.c-cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.c-cart-product-info {
    flex: 1;
}

.c-cart-quantity {
    width: 120px;
}

.c-quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.c-quantity-btn {
    width: 30px;
    height: 30px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
}

.c-quantity-btn:hover {
    background: var(--primary);
    color: white;
}

.c-quantity-input input {
    width: 60px;
    height: 30px;
    border: none;
    text-align: center;
    font-weight: var(--font-weight-bold);
    background: white;
    font-size: var(--font-size-sm);
}

.c-cart-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.c-cart-summary {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.c-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.c-summary-total {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    border-bottom: none;
}

/* 16. RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    :root {
        --font-size-base: 14px;
        --font-size-md: 16px;
        --font-size-lg: 18px;
        --font-size-xl: 20px;
        --font-size-xxl: 24px;
        --font-size-xxxl: 28px;
    }
    
    h1, .h1 { font-size: var(--font-size-xxl); }
    h2, .h2 { font-size: var(--font-size-xl); }
    h3, .h3 { font-size: var(--font-size-lg); }
    h4, .h4 { font-size: var(--font-size-md); }
    
    .c-product-title {
        font-size: var(--font-size-sm);
        min-height: 40px;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .c-product-image {
        height: 180px;
    }
    
    .c-cart-product {
        flex-direction: column;
        text-align: center;
    }
    
    .c-cart-product-image {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    :root {
        --font-size-xxxl: 24px;
        --font-size-xxl: 20px;
    }
    
    h1, .h1 { font-size: var(--font-size-xl); }
    h2, .h2 { font-size: var(--font-size-lg); }
    
    .c-price-current {
        font-size: var(--font-size-md);
    }
    
    .c-product-card {
        margin-bottom: 20px;
    }
    
    .c-category-card {
        padding: 20px 15px;
    }
}

/* 17. FIX SPECIFIC ISSUES */
.c-topbar {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
}

.c-topbar a {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
}

.c-layout-footer ul.list-unstyled li {
    font-size: var(--font-size-sm);
    margin-bottom: 10px;
}

.c-cart-items {
    font-size: 10px;
    font-weight: var(--font-weight-bold);
}

.c-product-meta {
    font-size: var(--font-size-xs);
    color: var(--gray);
}

/* 18. LINE CLAMP UTILITIES */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 19. TEXT TRUNCATION */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 20. NOTIFICATIONS & ALERTS */
.alert-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 21. LOADING STATES */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 22. PRODUCT GRID LAYOUT */
.row.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

/* 23. EMPTY STATES */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--gray);
    margin-bottom: 20px;
}

/* 24. PRICE COMPONENTS */
.price-comparison {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.price-saving {
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

/* 25. RATING STARS */
.rating-stars {
    color: var(--warning);
    font-size: var(--font-size-sm);
}

.rating-count {
    color: var(--gray);
    font-size: var(--font-size-xs);
    margin-left: 5px;
}