/* Dropship Store - Modern CSS Styles */

/* CRITICAL: Override Bootstrap's global link underline - Must be at the top */
/* Bootstrap 5.3.0 adds: a { text-decoration: underline; } */
.product-card a,
.product-card a:link,
.product-card a:visited,
.product-card a:active,
.product-card a:hover,
.product-card a:focus,
.product-card .product-name a,
.product-card .product-name a:link,
.product-card .product-name a:visited,
.product-card .product-name a:active,
.product-card .product-name a:hover,
.product-card .product-name a:focus,
.product-card h5.product-name a,
.product-card h5.product-name a:link,
.product-card h5.product-name a:visited,
.product-card h5.product-name a:active,
.product-card h5.product-name a:hover,
.product-card h5.product-name a:focus,
h5.product-name a,
h5.product-name a:link,
h5.product-name a:visited,
h5.product-name a:active,
h5.product-name a:hover,
h5.product-name a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    -webkit-text-decoration: none !important;
    -moz-text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
}

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Navbar Styles */
.navbar {
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
    margin: 0 0.5rem;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.min-vh-75 {
    min-height: 75vh;
}

.gradient-circle {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Override Bootstrap's global link underline for ALL product card links - Must override Bootstrap */
.product-card a,
.product-card a:link,
.product-card a:visited,
.product-card a:active,
.product-card a:hover,
.product-card a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Specifically target product name links in cards */
.product-card .product-name a,
.product-card .product-name a:link,
.product-card .product-name a:visited,
.product-card .product-name a:active,
.product-card .product-name a:hover,
.product-card .product-name a:focus,
.product-card h5.product-name a,
.product-card h5.product-name a:link,
.product-card h5.product-name a:visited,
.product-card h5.product-name a:active,
.product-card h5.product-name a:hover,
.product-card h5.product-name a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    padding-top: 75%;
}

.product-image {
    position: relative;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    opacity: 0;
}

.product-image img.loaded {
    opacity: 1;
}

.product-image .img-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.product-image .img-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    z-index: 2;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Override Bootstrap's global link underline for product cards - Must be after Bootstrap */
/* Bootstrap adds: a { text-decoration: underline; } - This overrides it */
.product-card a,
.product-card a:link,
.product-card a:visited,
.product-card a:active,
.product-card a:hover,
.product-card a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    -webkit-text-decoration: none !important;
    -moz-text-decoration: none !important;
}

/* Product Name Specific - Override Bootstrap */
.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Remove underline from ALL product title links - Most Specific and Highest Priority */
.product-name a,
.product-name a:link,
.product-name a:visited,
.product-name a:active,
.product-name a:hover,
.product-name a:focus {
    color: var(--dark-color) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    border: none !important;
    box-shadow: none !important;
    transition: var(--transition);
}

.product-name a:hover {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Product Card Specific Rules */
.product-card .product-name a,
.product-card .product-name a:link,
.product-card .product-name a:visited,
.product-card .product-name a:active,
.product-card .product-name a:hover,
.product-card .product-name a:focus,
.product-card h5.product-name a,
.product-card h5.product-name a:link,
.product-card h5.product-name a:visited,
.product-card h5.product-name a:active,
.product-card h5.product-name a:hover,
.product-card h5.product-name a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    border: none !important;
    box-shadow: none !important;
}

h5.product-name a,
h5.product-name a:link,
h5.product-name a:visited,
h5.product-name a:active,
h5.product-name a:hover,
h5.product-name a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    border: none !important;
    box-shadow: none !important;
}

.product-info .product-name a,
.product-info .product-name a:link,
.product-info .product-name a:visited,
.product-info .product-name a:active,
.product-info .product-name a:hover,
.product-info .product-name a:focus,
.product-info h5 a,
.product-info h5 a:link,
.product-info h5 a:visited,
.product-info h5 a:active,
.product-info h5 a:hover,
.product-info h5 a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Global rule for product cards - Override Bootstrap and any other rules */
.product-card h5 a,
.product-card h4 a,
.product-card h3 a,
.product-card h2 a,
.product-card h1 a,
.product-card h5 a:link,
.product-card h4 a:link,
.product-card h3 a:link,
.product-card h2 a:link,
.product-card h1 a:link,
.product-card h5 a:visited,
.product-card h4 a:visited,
.product-card h3 a:visited,
.product-card h2 a:visited,
.product-card h1 a:visited,
.product-card h5 a:active,
.product-card h4 a:active,
.product-card h3 a:active,
.product-card h2 a:active,
.product-card h1 a:active,
.product-card h5 a:hover,
.product-card h4 a:hover,
.product-card h3 a:hover,
.product-card h2 a:hover,
.product-card h1 a:hover,
.product-card h5 a:focus,
.product-card h4 a:focus,
.product-card h3 a:focus,
.product-card h2 a:focus,
.product-card h1 a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    border: none !important;
    box-shadow: none !important;
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.compare-price {
    font-size: 1rem;
    color: var(--secondary-color);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.discount-badge {
    font-size: 0.85rem;
    color: var(--danger-color);
    font-weight: 600;
    margin-left: 0.5rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 100px;
}

.wishlist-btn, .wishlist-btn-detail {
    flex: 0 0 auto;
    min-width: auto;
}

.variant-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Product Detail Page */
.product-detail-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.product-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail-img:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Cart Page */
.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.card {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: white !important;
    text-decoration: underline !important;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Badges */
.badge {
    padding: 0.5em 0.75em;
    border-radius: 6px;
    font-weight: 500;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .gradient-circle {
        width: 200px;
        height: 200px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

/* Admin Panel Styles */
.bg-light {
    background-color: #f8f9fa !important;
}

/* Input Group */
.input-group .btn {
    border-radius: 0;
}

.input-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.input-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Table Styles */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background-color: var(--light-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Sticky Navbar */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Category Navbar Styles */
.category-navbar {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.category-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
}

.category-btn-desktop {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 8px 20px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.category-btn-desktop:hover {
    background: #0b5ed7;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.category-btn-desktop:active,
.category-btn-desktop:focus {
    background: #0a58ca;
    color: white;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.category-btn-mobile {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 12px 8px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    display: block;
}

.category-btn-mobile:hover {
    background: #0b5ed7;
    color: white;
    transform: scale(1.02);
}

.category-btn-mobile:active,
.category-btn-mobile:focus {
    background: #0a58ca;
    color: white;
}

/* Improved Product Cards */
.product-card {
    border: 1px solid #e9ecef;
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.product-image {
    background: #f8f9fa;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* WhatsApp Button Styling */
.btn-success {
    background-color: #25D366;
    border-color: #25D366;
}

.btn-success:hover {
    background-color: #128C7E;
    border-color: #128C7E;
}

/* Price Styling */
.current-price {
    color: #198754;
    font-weight: 700;
}

.compare-price {
    color: #6c757d;
    font-size: 0.9em;
    text-decoration: line-through;
}

/* Trending Products Section */
.trending-section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .category-navbar {
        top: 56px;
    }
    
    .category-scroll {
        padding: 0 1rem;
    }
    
    .category-btn-mobile {
        font-size: 0.85rem;
        padding: 10px 6px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }
    
    .dropdown-menu {
        text-align: left;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}