/* ==========================================================================
   Modern Storefront Stylesheet - main.css
   ========================================================================== */

:root {
    --primary-color: #fe5200;
    --primary-hover: #e04800;
    --primary-light: #fff3ee;
    --secondary-color: #1e293b;
    --accent-color: #10b981;

    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-header: #ffffff;
    --bg-footer: #0f172a;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #ffffff;

    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #0284c7;

    --border-color: #e2e8f0;
    --border-focus: #fe5200;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary-color: #ff6b26;
    --primary-hover: #fe5200;
    --primary-light: rgba(254, 82, 0, 0.12);
    --secondary-color: #0f172a;
    --accent-color: #34d399;

    --bg-main: #0b1120;
    --bg-surface: #1e293b;
    --bg-header: #1e293b;
    --bg-footer: #020617;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-light: #ffffff;

    --border-color: #334155;
    --border-focus: #ff6b26;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.55);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header & Search Bar Modern Polish
   ========================================================================== */
#navbar_top {
    background: var(--bg-header);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.logo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
}

.main-logo img {
    max-height: 48px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.main-logo:hover img {
    transform: scale(1.02);
}

.main-search form {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 4px 6px 4px 18px;
    position: relative;
    transition: all var(--transition-fast);
    width: 100%;
    min-width: 320px;
}

.main-search form:focus-within {
    border-color: var(--border-focus);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.main-search form input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    color: var(--text-primary);
}

.main-search form button {
    background: var(--primary-color);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.main-search form button:hover {
    background: var(--primary-hover);
}

.search_result {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    z-index: 1000;
    max-height: 420px;
    overflow-y: auto;
}

.search_result:empty,
.search_result:not(:has(*)) {
    display: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.search_result:not(:empty) {
    display: block;
}

.search_result .search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.search_result .search-item:hover {
    background: var(--primary-light);
}

.header-list-items {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.header-item a:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.header-item.cart-dialog {
    position: relative;
}

.header-item.cart-dialog a p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-item.cart-dialog a span {
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

#theme-toggle {
    border-radius: var(--radius-full);
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

#theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==========================================================================
   Category Menu & Megamenu Polish
   ========================================================================== */
.menu-area {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

.arogga-nav .main-menu {
    display: flex;
    gap: 4px;
    align-items: center;
}

.arogga-nav .menu-link {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.arogga-nav .menu-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    padding: 8px 0;
    display: none;
    z-index: 999;
}

.menu-item:hover > .menu-dropdown {
    display: block;
}

.submenu-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    transition: all var(--transition-fast);
}

.submenu-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* ==========================================================================
   Product Cards - Sleek Modern Design
   ========================================================================== */
.section-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-xs);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--bg-main);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-title .flash-icon {
    color: var(--primary-color);
    font-size: 22px;
}

.sale-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.see-all-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.see-all-link:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Product Card */
.product-card,
.product_item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-smooth);
    height: 100%;
}

.product-card:hover,
.product_item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.product-img-wrap,
.pro_img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrap img,
.pro_img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img,
.product_item:hover .pro_img img {
    transform: scale(1.06);
}

.discount-badge,
.product_item_inner .sale-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: var(--radius-full);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.product-info,
.pro_des {
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name,
.pro_name {
    margin-bottom: 6px;
    min-height: 38px;
}

.product-name a,
.pro_name a {
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.product-name a:hover,
.pro_name a:hover {
    color: var(--primary-color);
}

.product-price,
.pro_price p {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
    margin: 4px 0;
}

.product-original,
.pro_price del {
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 400;
    margin-left: 6px;
    text-decoration: line-through;
}

.product-card .add-cart-btn,
.pro_btn button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    margin-top: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.product-card .add-cart-btn:hover,
.pro_btn button:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(254, 82, 0, 0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   Checkout & Cart Pages Modernization
   ========================================================================== */
.chheckout-section {
    padding: 30px 0 50px;
}

.checkout-shipping .card,
.cart-summary-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
}

.checkout-shipping .card-header,
.cart-summary-card .card-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.checkout-shipping .card-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.checkout-shipping .card-body {
    padding: 24px;
}

.checkout-shipping .form-group label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.checkout-shipping .form-control {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-surface);
    transition: all var(--transition-fast);
}

.checkout-shipping .form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

/* Order Summary Table */
.cart-table-custom {
    width: 100%;
}

.cart-table-custom th {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1.5px solid var(--border-color);
    padding: 10px;
}

.cart-table-custom td {
    padding: 12px 10px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.order-btn-confirm {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(254, 82, 0, 0.35);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.order-btn-confirm:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 18px rgba(254, 82, 0, 0.45);
    transform: translateY(-2px);
}

/* Payment Methods Selector in Checkout */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.payment-methods .form-check {
    padding: 0;
    margin: 0;
}

.payment-methods .form-check-input {
    display: none;
}

.payment-methods .form-check-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    width: 100%;
}

.payment-methods .form-check-input:checked + .form-check-label {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(254, 82, 0, 0.15);
}

.payment-methods .form-check-label:hover {
    border-color: var(--primary-color);
}

/* Quantity Controls */
.quantity {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--bg-surface);
}

.quantity button,
.quantity span.minus,
.quantity span.plus {
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.quantity button:hover,
.quantity span.minus:hover,
.quantity span.plus:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.quantity input {
    width: 36px;
    text-align: center;
    border: none;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    outline: none;
}

/* Checkout Place Order Button */
.order_place {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e04800 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(254, 82, 0, 0.35);
    transition: all var(--transition-smooth);
    text-align: center;
    letter-spacing: 0.3px;
    display: block;
}

.order_place:hover {
    background: linear-gradient(135deg, #e04800 0%, #c83d00 100%);
    box-shadow: 0 8px 22px rgba(254, 82, 0, 0.45);
    transform: translateY(-2px);
}

/* Cart Table Polish */
.cart_table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0;
}

.cart_table thead th {
    background: var(--bg-main);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 12px;
    border-bottom: 2px solid var(--border-color);
}

.cart_table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.cart_table tbody tr:last-child td {
    border-bottom: none;
}

.cart_table td img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    border: 1px solid var(--border-color);
    margin-right: 8px;
}

.cart_table tfoot tr {
    background: var(--bg-main);
}

.cart_table tfoot th,
.cart_table tfoot td {
    padding: 12px 16px;
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

.cart_table tfoot tr:last-child {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--primary-light);
}

.cart_remove {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.cart_remove:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-danger);
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
@media (max-width: 768px) {
    .section-card {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .main-search form {
        min-width: 100%;
    }

    .section-title {
        font-size: 17px;
    }

    .product-price,
    .pro_price p {
        font-size: 14.5px;
    }
}
