/* GiftTree Base Styles */

/* CSS Variables */
:root {
    --primary-color: #E91E63;
    --secondary-color: #4CAF50;
    --accent-color: #FF9800;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #FFF8F0;
    --border-light: #E0E0E0;
    --pink-gradient: linear-gradient(135deg, #E91E63 0%, #FF6090 100%);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: #f5f5f5;
    overflow-x: hidden;
    max-width: 100%;
}

/* Common Button Styles */
.btn-primary {
    background: var(--pink-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

/* Common Form Styles */
.form-control {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.1);
}

/* Common Card Styles */
.card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 16px;
}

/* Common Section Styles */
.section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin-bottom: 16px;
    padding: 32px 0;
    border-radius: 20px;
    margin: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E91E63 0%, #FF6090 50%, #4CAF50 100%);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-link {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.section-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Common Badge Styles */
.badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge.success {
    background: var(--secondary-color);
}

.badge.warning {
    background: var(--accent-color);
}

/* Common Rating Styles */
.rating-stars {
    color: #FFA500;
    font-size: 14px;
}

.rating-text {
    font-size: 12px;
    color: var(--text-light);
}

/* Common Price Styles */
.price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.price-original {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 8px;
}

.discount {
    background: #E8F5E8;
    color: var(--secondary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

/* Common Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

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

.justify-content-center {
    justify-content: center;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-20 {
    margin-top: 20px;
}

/* Common Toast Styles */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-dark);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Common Loading Styles */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Common Responsive Utilities */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

/* Desktop Styles */
@media (min-width: 992px) {
    .mobile-only {
        display: none;
    }

    .desktop-only {
        display: block;
    }

    body {
        padding-bottom: 0;
        background: white;
    }

    .section {
        padding: 40px 0;
        margin-bottom: 0;
        margin: 24px;
        border-radius: 24px;
    }

    .section-header {
        padding: 0 20px;
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 2rem;
    }

    .toast {
        bottom: 30px;
    }

    /* Desktop Slider */
    .mobile-slider {
        height: 450px;
        margin-bottom: 40px;
        margin: 24px;
        border-radius: 24px;
    }

    .slide-content h2 {
        font-size: 48px;
    }

    .slide-content p {
        font-size: 20px;
    }

    .slide-btn {
        padding: 16px 32px;
        font-size: 16px;
    }

    /* Desktop Product Grid */
    .products-row {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        padding: 0 20px;
    }

    .product-card-mobile {
        width: 100%;
        transition: transform 0.3s;
    }

    .product-card-mobile:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    .product-image {
        height: 200px;
    }

    /* Quick Actions Desktop */
    .quick-actions {
        padding: 40px 20px;
    }

    .actions-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 30px;
    }

    .action-icon {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }

    .action-icon img {
        border-radius: 16px;
    }

    .action-label {
        font-size: 14px;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 991px) {
    .section {
        padding: 30px 0;
    }
}

/* Mobile Overflow Prevention */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        position: relative;
    }
    
    body {
        padding-bottom: 80px;
    }
    
    /* Prevent all containers from overflowing */
    .container, .container-fluid,
    .row, [class*="col-"] {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Ensure text doesn't overflow */
    h1, h2, h3, h4, h5, h6, p, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Table responsiveness */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    
    /* Prevent wide content */
    pre, code {
        max-width: 100%;
        overflow-x: auto;
    }
    
    /* Ensure cards fit */
    .card {
        max-width: 100%;
    }
    
    /* Section mobile adjustments */
    .section {
        padding: 24px 0;
        margin: 8px;
        border-radius: 16px;
    }
    
    .section-header {
        padding: 0 16px;
        margin-bottom: 16px;
    }
    
    .section-title {
        font-size: 20px;
    }
}