@import url(//fonts.googleapis.com/css?family=Ubuntu);

body {
    margin:0;
    padding:0;
    font-family:helvetica, sans-serif;
}

h1, h2, h3, h4, h5 , h6 {
    font-family: 'Ubuntu', sans-serif; font-weight:normal;
}

a {
    text-decoration:none;
    color:#5993bb;
}

a:hover {
    color:#77b6e2;
}

a.button, input[type="submit"] {
    color:#fff;
    background:#5993bb;
    border-radius:4px;
    padding:10px 20px;
    font-size:14px;
    border:0;
}

a.button.light {
    color:#666;
    background:#ededed;
}

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

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

table {
    width:100%;
    border-spacing:0;
    border-collapse: collapse;
}

table th, table td {
    text-align:left;
    font-size:14px;
    padding:10px;
    margin:0;
}

tbody tr:nth-child(odd) {
    background:#efefef;
}

tbody tr.subtotal {
    background:#ccc;
}

thead th, tbody tr.total {
    background:#5993bb;
    color:#fff;
    font-weight:bold;
}

table.cart {
    margin-bottom:40px;
}

table.cart img {
    width:180px;
}

tbody td.num {
    text-align:right;
}

td input[type="submit"] {
    font-size:12px;
    padding:4px 10px;
}

form p label, form p input {
    float:left;
    clear:both;
}

form p label {
    font-size:14px;
    padding-bottom:4px;
}

form p input {
    width:300px;
    font-size:13px;
    margin-bottom:10px;
    padding:10px 12px;
    border:0;
    background:#efefef;
    color:#666;
    border-radius:4px;
}

ul.errorlist {
   float:left;
   color:#ff0000;
   clear:both;
   font-size:13px;
   margin:0 0 0 10px;
   padding:10px 0;
}


#header {
    padding:10px 100px;
    font-size:18px;
    overflow:auto;
}

#subheader {
    background:#ececec;
    color:#444;
    padding:15px 100px;
    overflow:auto;
}

#header .logo {
    font-family: 'Ubuntu', sans-serif;
    float:left;
    color:#333;
    font-size:22px;
    margin-right:10%;
}

#subheader .cart {
    float:right;
    padding-top:4px;
}

#content {
    padding:0 100px;
    overflow:hidden;
}

/* Frontend sidebar styles */
#shop-sidebar {
    width:220px;
    padding:30px 20px 0 0;
    float:left;
}

#shop-sidebar ul{
    margin:0;
    padding:0;
}

#shop-sidebar ul li {
    margin:0;
    list-style:none;
    padding:10px 14px;
}

#shop-sidebar ul li a {
    display:block;
}

#shop-sidebar ul li.selected {
    background:#5993bb;
    border-radius:4px;
}

#shop-sidebar ul li.selected a {
    color:#fff;
}

/* Frontend main content area */
#shop-main {
    float:left;
    width: 96%;
    margin-right:-220px;
    overflow:hidden;
}

.product-list .item {
    width:25%;
    padding:10px 20px 10px 0;
    float:left;
    text-align:center;
    line-height:1.2;
}

.product-list .item img {
    width:100%;
    margin-bottom:8px;
}

.product-detail {
    text-align:justify;
}

.product-detail .price {
    color:#333;
    font-size:28px;
    font-weight:bold;
}

.product-detail img {
    width:40%;
    float:left;
    padding:0 20px 20px 0;
}

.product-detail h1 {
    margin-bottom:0;
}

.product-detail h2 {
    margin-top:10px;
}

.order-form {
    float:left;
}

.order-info {
    float:right;
    width:300px;
    background:#efefef;
    padding:10px 20px;
    color:#333;
    border-bottom:4px solid #5993bb;
}

.order-info h3 {
    color:#5993bb;
}

.order-info ul li {
    margin:0;
    padding:0;
    font-size:14px;
}

.order-info p {
    font-weight:bold;
    float:right;
}

.order-info span {
    float:right;
}

.neg {
    color:#dc1616;
}

.languages {
   float:right;
   padding-top:4px;
   font-size:14px;
}

.languages ul {
    list-style:none;
    margin:0;
    padding:0;
    float:left;
}

.languages ul li {
    float:left;
    margin:0 0 0 10px;
    font-size:14px;
}

.languages p {
    float:left;
    margin:0;
}

.recommendations {
    clear:both;
}

.recommendations div {
    float:left;
}

.recommendations img {
    width:200px
}

.recommendations p {
    clear:both;
}

.recommendations.cart {
    width:60%;
    float:left;
    overflow:auto;
}

.recommendations.cart h3 {
    margin-top:0;
}

.recommendations.cart .item {
    margin-right:10px;
}

.recommendations.cart img {
    width:120px;
}

/* braintree hosted fields */
form div.field {
    font-size:13px;
    color:#666;
    width:300px;
    height:22px;
    margin-bottom:10px;
    padding:6px 12px;
    border:0;
    background:#efefef;
    color:#666;
    border-radius:4px;
}

/* WhatsApp Link Styling */
.whatsapp-link {
    color: #25D366;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.whatsapp-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Alert Message Styling */
.alert {
    position: fixed; /* Keep alerts fixed at the top */
    top: 10px; /* Small space from the top */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Adjust centering */
    z-index: 1050; /* Ensure it's above most other content */
    min-width: 300px; /* Minimum width */
    max-width: 80%; /* Maximum width */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Add a subtle shadow */
    margin-bottom: 0; /* Remove default bottom margin */
}

/* Ensure multiple alerts stack nicely */
.alert + .alert {
    top: calc(10px + 4rem); /* Adjust based on alert height + spacing */
}

/* Alert type specific styles */
.alert-error { /* Django uses 'error' tag for errors */
    background-color: #f8d7da; /* Bootstrap danger background */
    color: #721c24; /* Bootstrap danger text */
    border-color: #f5c6cb; /* Bootstrap danger border */
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Accessibility: Skip to main content link */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0.75rem 1.25rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background-color: #007bff !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 0.25rem !important;
    z-index: 100000 !important;
    display: block !important;
    text-align: center !important;
    font-weight: bold !important;
}

/* ========== Loading States ========== */

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    position: relative;
}

.spinner-border {
    border: 3px solid rgba(255, 106, 0, 0.2);
    border-radius: 50%;
    border-top: 3px solid #ff6a00;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.spinner-small {
    width: 20px;
    height: 20px;
}

.spinner-small .spinner-border {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

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

/* Button Loading */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading .btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-loading .btn-text {
    visibility: hidden;
}

/* Inline Loading */
.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

/* Form Loading */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

/* Table Loading */
.table-loading {
    position: relative;
}

.table-loading tbody {
    opacity: 0.5;
}

/* Content Loading */
.content-loading {
    position: relative;
    min-height: 100px;
}

.content-loading.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Fade Loading */
.fade-loading {
    transition: opacity 0.3s ease;
}

.fade-loading.loading {
    opacity: 0.5;
    pointer-events: none;
}
