/* ==============================================
   CUSTOMER SPECIFIC DISCOUNTS - FRONTEND STYLES
   Developer: Sascha Marc Rahn
   Primary Color: #FDB714
   ============================================== */

/* Dashboard Widget Styles - Already inline in view */

/* My Discounts Page */
.csd-discounts-page {
    padding: 20px 0;
}

.csd-discounts-page h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #FDB714;
}

/* Empty State */
.csd-no-discounts {
    text-align: center;
    padding: 60px 20px;
}

.csd-empty-state {
    max-width: 500px;
    margin: 0 auto;
}

.csd-empty-icon {
    font-size: 80px;
    display: block;
    margin-bottom: 20px;
}

.csd-empty-state h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.csd-empty-state p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Discount Sections */
.csd-discount-section {
    margin-bottom: 50px;
}

.csd-section-title {
    color: #333;
    font-size: 22px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FDB714;
    display: flex;
    align-items: center;
    gap: 10px;
}

.csd-section-icon {
    font-size: 28px;
}

/* Category Grid */
.csd-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.csd-category-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.csd-category-card:hover {
    border-color: #FDB714;
    box-shadow: 0 8px 20px rgba(253, 183, 20, 0.2);
    transform: translateY(-5px);
}

.csd-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.csd-category-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
}

.csd-discount-badge {
    background: #FDB714;
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
}

.csd-category-body {
    flex: 1;
    margin-bottom: 15px;
}

.csd-product-count {
    color: #666;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.csd-icon {
    font-size: 16px;
}

.csd-min-purchase-info {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    border-left: 3px solid #FDB714;
}

.csd-min-purchase-info small {
    color: #666;
    line-height: 1.6;
}

.csd-category-footer {
    margin-top: auto;
}

/* FIX KNAPPEN - GUL MED SORT TEKST */
.csd-view-button {
    background: #Fff !important;
    color: #333 !important;
    border: 2px solid #Fff !important;
    font-weight: bold !important;
}

.csd-view-button:hover {
    background: #f5a800 !important;
    color: #333 !important;
    border-color: #f5a800 !important;
    transform: scale(1.02);
}

/* Products Grid */
.csd-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.csd-product-card {
    background: white !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.csd-product-card:hover {
    border-color: #FDB714;
    box-shadow: 0 10px 25px rgba(253, 183, 20, 0.2);
    transform: translateY(-5px);
}

.csd-product-image {
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
}

.csd-product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.csd-product-card:hover .csd-product-image img {
    transform: scale(1.05);
}

.csd-product-image .csd-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FDB714;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.csd-favorite-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.csd-favorite-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.csd-heart-icon {
    font-size: 20px;
    line-height: 1;
}

.csd-favorite-btn.is-favorite {
    background: #ffe0e0;
}

.csd-product-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.csd-product-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.4;
}

.csd-product-title a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.csd-product-title a:hover {
    color: #FDB714;
}

.csd-product-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.csd-original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 16px;
}

.csd-discounted-price {
    color: #28a745;
    font-size: 22px;
    font-weight: bold;
}

.csd-savings-amount {
    color: #28a745;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}

.csd-product-footer {
    padding: 0 20px 20px 20px;
    margin-top: auto;
}

.csd-add-to-cart-button {
    display: block;
    width: 100%;
    background: #FDB714;
    color: #333;
    text-align: center;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #FDB714;
}

.csd-add-to-cart-button:hover {
    background: #333;
    color: #FDB714;
    border-color: #333;
}

/* Cart Discount Line */
.csd-discount-line th,
.csd-discount-line td {
    color: #28a745;
    font-weight: bold;
}

.csd-discount-line th span {
    display: inline-block;
    background: #FDB714;
    color: #333;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .csd-category-grid,
    .csd-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .csd-category-grid {
        grid-template-columns: 1fr;
    }
    
    .csd-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .csd-discounts-page h2 {
        font-size: 24px;
    }
    
    .csd-section-title {
        font-size: 20px;
    }
    
    .csd-product-image img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .csd-products-grid {
        grid-template-columns: 1fr;
    }
    
    .csd-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .csd-product-pricing {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Loading Animation */
.csd-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(253, 183, 20, 0.3);
    border-radius: 50%;
    border-top-color: #FDB714;
    animation: csd-spin 1s ease-in-out infinite;
}

@keyframes csd-spin {
    to { transform: rotate(360deg); }
}

/* Notification Styles */
.csd-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: #FDB714;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: csd-slide-in 0.3s ease;
}

@keyframes csd-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.csd-notification.success {
    background: #28a745;
    color: white;
}

.csd-notification.error {
    background: #dc3545;
    color: white;
}

/* Print Styles */
@media print {
    .csd-favorite-btn,
    .csd-add-to-cart-button,
    .csd-view-button {
        display: none;
    }
    
    .csd-product-card,
    .csd-category-card {
        break-inside: avoid;
    }
}

/* Accessibility */
.csd-favorite-btn:focus,
.csd-add-to-cart-button:focus,
.csd-view-button:focus {
    outline: 3px solid #FDB714;
    outline-offset: 2px;
}
/* CUSTOM COLOR OVERRIDES - Add at bottom of file */
.csd-category-card,
.csd-product-card {
    background: #FFFFFF !important;
    color: #333333 !important;
}

.csd-category-header h4,
.csd-product-title,
.csd-product-title a {
    color: #333333 !important;
}

.csd-product-count,
.csd-savings-amount {
    color: #555555 !important;
}

/* Light background alternative */
.csd-category-card {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFFFF 100%) !important;
    border: 2px solid #FDB714 !important;
}

/* Product cards light */
.csd-product-card {
    background: #FFFFFF !important;
    border: 2px solid #e0e0e0 !important;
}

.csd-product-card:hover {
    border-color: #FDB714 !important;
}
/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .csd-product-card,
    .csd-category-card {
        background: #2d2d2d;
        border-color: #444;
    }
    
    .csd-product-title a,
    .csd-category-header h4 {
        color: #f0f0f0;
    }
    
    .csd-min-purchase-info {
        background: #3d3d3d;
    }
}